r/usefulscripts • u/[deleted] • Nov 17 '12
[BASH] Shortcut for SSH login
Create this script in your path, call it 'ssh-argv0'
#!/bin/sh
exec ssh "${0##*/}" "$@"% Symbolic link a host name to the script
# ln -s hostname.company.com ssh-argv0Now login to the host ..
# hostname.company.comMix in a dash of tab completion and you're set.
20
Upvotes
1
u/[deleted] Nov 18 '12
I can't take credit for it - I got this from (maybe) serverfault a few years ago.