Powered by Invision Power Board


  Reply to this topicStart new topicStart Poll

> Testing ssh connection from KSH script, SSH from kornshell script
dmilks
Posted: May 30 2005, 02:50 PM
Quote Post


Newbie
*

Group: Members
Posts: 1
Member No.: 1024
Joined: 30-May 05



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
PMEmail Poster
Top
fishsponge
Posted: May 31 2005, 09:18 PM
Quote Post


Administrator
********

Group: Admin
Posts: 679
Member No.: 1
Joined: 13-February 03



surely if it cannot connect to the remote host, the command won't run anyway...
PMEmail PosterUsers WebsiteICQAOLYahooMSN
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
« Next Oldest | Shells & Scripting | Next Newest »

Topic Options Reply to this topicStart new topicStart Poll

 



[ Script Execution time: 0.2068 ]   [ 12 queries used ]   [ GZIP Enabled ]




Partners: Cambridge Plus :: <Link Available> :: 3D Mechanical Design :: <Link Available>
Unix Man Pages / Linux Man Pages :: HiFi Forum :: SIP VoIP Phone & Provider Reviews :: UNIX/Linux Forum Archives

More info on advertising on Unix/Linux Forum