diff options
Diffstat (limited to 'ssh/.local')
-rwxr-xr-x | ssh/.local/bin/ssh-open | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ssh/.local/bin/ssh-open b/ssh/.local/bin/ssh-open new file mode 100755 index 0000000..276360c --- /dev/null +++ b/ssh/.local/bin/ssh-open @@ -0,0 +1,8 @@ +#!/usr/bin/sh + +HOSTNAME=$(uname -n) + +printf '%s' "$1" | sed \ + -e "s/localhost/$HOSTNAME/" \ + -e "s/127\(\.[0-9]\{1,3\}\)\{3\}/$HOSTNAME/" | + xargs -I{} ssh -l "$USER" -p 2222 localhost "xdg-open '{}'" |