Hi. In my KSH script I'm running a command on a remote server. I want to know how I can test to see if the remote server is available (accessible) prior to running the command. Any ideas?
My command looks like:
`ssh $USER@$TARGET_SERVER_DNS ls -l $REMOTE_FOLDER `
This check should be generic enough to handle the following cases:
- server not available (network problem)
- server DNS name not found
- invalid user name, user doesn't exist on the remote server
- remote folder path doesn't exist
- etc
I just need for the SSH command to return a true/false indicating success or failure, that's it.
One inportant point: PING is disabled in my environment.