Posted on 2008-04-25 17:02:42-07 by venkata
how to get files when ftp servers are in two different networks.
hi, I've two ftp servers (A & B ftp servers) sitting on two different networks (e.g. X & Y networks). I could connect from "A" ftp server which is in "X" network to "B" ftp server which is in "Y" network and could get the files from "B" FTP server to "A" ftp server thru SFTP manually. The problem is if I try to do the same with a shell script, it is able to connect to the "B" ftp server from A network, but unable to list the files. Please find the shell script that is given below. Could you please help me out if you any work arounds for this issue. Thanks a lot for your help in advance. #!/usr/bin/bash # Linux/UNIX box with ssh key based login enabled SERVER="testing.com" # SSH User name USR="test" OUT="out.txt" CMD="ls" SSH_PATH="." ssh $USR@$SERVER ls Regards, Venkata
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.