Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Test ssh connection from KSH script
Name: dmilks Date: May 30, 2005 at 07:58:18 Pacific OS: AIX CPU/Ram: ?
Comment:
Hi. I have a kornshell script that runs on a daily basis as a cron job. Part of what the script does is copy the folder contents from another server to the current server (server where KSH script is running).
I have a scp command, as follows:
scp $REMOTE_HOST:$REMOTE_FILE_DIR/* $TMP_DIR
How would I verify the connection to the "remote host"? In other words, I don't want to run the SCP command unless it can connect to the remote host. How would I do this?
Summary: Thanks for the response. I've another question. I was trying to connect to a remote system via ssh. When I run the script from my user account, ssh connects to remote system successfully. If I try run...