Skip to content

Instantly share code, notes, and snippets.

@erikbgithub
Created July 29, 2009 15:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erikbgithub/158211 to your computer and use it in GitHub Desktop.
Save erikbgithub/158211 to your computer and use it in GitHub Desktop.
#!/bin/sh ####################################################################
#
# author: Erik Bernoth
#
# tricks the mac 10.5 terminal tab name into writing the ssh position instead
# of just "ssh"
#
# (c) 2009, do with this program what you want
#
##############################################################################
if [[ -z $2 ]]; then
user="root"
else
user=$2
fi
ln /usr/bin/ssh /usr/bin/ssh-$1
echo "ssh-$1 ${user}@$1"
ssh-$1 ${user}@$1
# in any case, try to delete the temporary link
trap "rm /usr/bin/ssh-$1" 0 1 2 3 10 11 15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment