ssh - My Setup
This is the shell script I use as my alias for ssh:
#!/bin/bash
ssh-agent
ssh-add
case $1 in
marge* ) SSHCOLOR=1 ;;
bluebones.net ) SSHCOLOR=1 ;;
barney* ) SSHCOLOR=7 ;;
lisa* ) SSHCOLOR=6 ;;
homer* ) SSHCOLOR=3 ;;
* ) SSHCOLOR=5 ;;
esac
if [ $1 ] ; then
tput setab $SSHCOLOR
\ssh $*
tput setab 9
else
echo “Usage: $0 [HOST]”
fi
The background colour shows me at a glance which machine I am on.
About this entry
You’re currently reading “ ssh - My Setup ,” an entry on bluebones.net
- Published:
- 2006.09.17
- Category:
- Programming
2 Comments
Jump to comment form | comments rss [?] | trackback uri [?]