blob: 2c7cca722e3dc3ecd739650027bd8ea7778e2089 (
plain)
1
2
3
4
5
6
7
8
|
## vim:ft=zsh
## check_ssh - returns true if a machine is reachable and allowing logins on ssh
## Usage: check_ssh <host>
if [[ $(ssh $1 'echo foo' 2> /dev/null < /dev/null ) == foo ]] {
return 0
} else {
return 1
}
|