SyntaxFix
Write A Post
Hire A Developer
Questions
You can use something like this
$(ssh -o BatchMode=yes -o ConnectTimeout=5 user@host echo ok 2>&1)
This will output "ok" if ssh connection is ok