blob: c4238450bc6364b48d1bdb7b90e201e910d75732 (
plain)
1
2
3
4
5
6
7
8
9
10
|
function check_ssh() {
ssh -o PasswordAuthentication=no "$@" true 2>&1 > /dev/null
[ $? == 0 ] && {
echo Connection successful
} || {
echo Connection failure
}
}
#check_ssh -i ~/.ssh/id_rsa tori_kago@torikago.com
|