The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Auto login with SFTP wsiefkas SUN Solaris 14 10-13-2008 01:41 PM
Auto X when Login BearCheese HP-UX 2 08-26-2008 07:02 PM
UNIX Auto-login nvanduyne UNIX for Advanced & Expert Users 1 06-15-2006 11:16 AM
Auto Login merlin UNIX for Dummies Questions & Answers 1 11-20-2002 12:01 PM
Auto login? merlin UNIX for Dummies Questions & Answers 4 02-26-2002 12:43 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-06-2009
srrao.ch srrao.ch is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 7
sftp auto login

Hi,

I looked into lot of posts on this question but i could not figure out the solution. we are using the following ftp shell program to send the file to target server.

#!/usr/bin/ksh
ftp -n -i<<EOF 2>&1
open <target server ip>
user <username> <pwd>
lcd /sc/doc/prd/FCSTP
put file1.txt
quit
EOF


Problem is target server is not accepting ftp. So, I have tryed with sftp then it's fine.But not able to auto login to the server.Please find the below sftp program.

#!/usr/bin/ksh
HOST='<target ip address>'
user='<username>'
pass='<pwd>'
echo "Starting to sftp..."
sftp $HOST<<EOF 2>&1
user $user
$pass
lcd /sc/doc/tst/FCSTP
put file1.txt
bye
EOF
echo "done"


Can any one please help me on this.

Thanks,
Srini

  #2 (permalink)  
Old 01-06-2009
ynilesh's Avatar
ynilesh ynilesh is offline
Registered User
  
 

Join Date: Oct 2007
Location: Bangalore, India.
Posts: 222
Can you post the log details here ?

- nilesh
  #3 (permalink)  
Old 01-06-2009
bobbygsk bobbygsk is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 90
First you have to setup SFTP. Your public key should be in the remote Server
Once you are set, then you dont need password to login for SFTP.

Use "sftp -v" option for detail steps of the sftp. You'll have an idea where it is failing.
  #4 (permalink)  
Old 01-06-2009
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,800
You have to have set up and exchange keys.

Read this article, it is for someone who has never done this before.
ssh-keygen: password-less SSH login
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:11 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0