summaryrefslogtreecommitdiff
path: root/.local/bin/shorts/ssha
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/shorts/ssha')
-rwxr-xr-x.local/bin/shorts/ssha5
1 files changed, 5 insertions, 0 deletions
diff --git a/.local/bin/shorts/ssha b/.local/bin/shorts/ssha
new file mode 100755
index 0000000..3cbf87c
--- /dev/null
+++ b/.local/bin/shorts/ssha
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+[ "$TERM" != "${TERM#st-256color}" ] && export TERM=xterm-256color
+sshadd "$(find ~/.ssh -name "${1}_id_*" | head -1)"
+ssh "$@" -t "tmux attach -t $USER || tmux new -s $USER"