I need to retrieve a list of *.zip files from server B which is an FTP server to server A (from server A) which is a mysql server. I am unable to use PHP or KeyGen for SSH without password. I am very limited on what I can do. I started trying to create a Perl Script to allow ssh log in without password but the dependencies just keep staking up, the network is not able to connect to the internet for updates, and I can not install in the default folder on the mysql or ftp server due to lack of permissions once I leave my ~ home directory.
The following bash script does exactly what I want however I can not use it in production because I can not generate a ssh-rsa/dsa-auth key that would allow ssh without a password. Any thoughts on the matter would be greatly appreciated.
`##Check tmp for previous listing
fileExists=$(ls /tmp | grep file | wc -l);
## File should not exist--- Just incase we will check and remove it
if [ $fileExists = "1" ]; then
rm /tmp/File.tmp
fi
ssh usr@100.0.0.0 ls | grep .zip >> /tmp/File.tmp
echo "File list recieved sucessfully $DATE" >> ./logs/fileList.log
Thank you in advance for any guidance you may be able to give me.
lftpcan do this quickly if your not squeamish about your username and password showing up in the process listIt also can run a whole series of commands from a file (with the -f switch), so the username and password don’t show up. It should be present on most linux boxes.