summaryrefslogtreecommitdiff
path: root/miscripts/check_ssh.sh
diff options
context:
space:
mode:
Diffstat (limited to 'miscripts/check_ssh.sh')
-rw-r--r--miscripts/check_ssh.sh10
1 files changed, 10 insertions, 0 deletions
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