|
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 |