From 14a892e627a375334a02381351f139d94ad7ecf3 Mon Sep 17 00:00:00 2001 From: ダカマ Date: Mon, 2 Jun 2025 13:08:46 +0200 Subject: First dump --- miscripts/check_ssh.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 miscripts/check_ssh.sh (limited to 'miscripts/check_ssh.sh') diff --git a/miscripts/check_ssh.sh b/miscripts/check_ssh.sh new file mode 100644 index 0000000..c423845 --- /dev/null +++ b/miscripts/check_ssh.sh @@ -0,0 +1,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 \ No newline at end of file -- cgit v1.2.3