Computing.Net > Forums > Unix > Test ssh connection from KSH script

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

Reply to Message Icon

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?

Thanks,
- Dylan



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Test ssh connection from KSH script

Logging xterm output from KSH www.computing.net/answers/unix/logging-xterm-output-from-ksh/5456.html

ksh script from csh www.computing.net/answers/unix/ksh-script-from-csh/4301.html

su root as user from a script www.computing.net/answers/unix/su-root-as-user-from-a-script/6307.html