1833871 Members
1766 Online
110063 Solutions
New Discussion

sftp

 
moody81
New Member

sftp

i have the same problem, i need to put the sftp into script like the following:

sftp xxx@x.x.x.x
password
cd /xxx/xxxx/
bin
prompt off
mget xxx*
exit

please can help me....
3 REPLIES 3
Asif Sharif
Honored Contributor

Re: sftp

moody81
New Member

Re: sftp

i could not find the same architecture for my script, i need an example to be able to continue my script.
Johnson Punniyalingam
Honored Contributor

Re: sftp

1. make changes in the ssh configuration to Allow
remote login betwenn the two machines.
hints [ use .shosts on the target server and also make
chnages to sshd_config File to ammend IgnoreRhosts &
RhostsAuthentication parameters]

2. sftp has option to process those commands in a batch file by using -b
option.

Example :-

sftp -b mybatfile username@host

In mybatfile:
passwd
get *.lst
quit
Problems are common to all, but attitude makes the difference