[NBLUG/talk] Open SSH host config prob
troy
fryman at sonic.net
Tue Sep 30 11:34:00 PDT 2003
On Mon, Sep 29, 2003 at 01:52:39PM -0700, icdedpple wrote:
> On Monday 29 September 2003 06:50 pm, ShadowEyez wrote:
>
> If the idea is to avoid having to type in the username everytime, you could
> try writing a shell script like this:
>
>
> #!/bin/bash
> ssh -1 -l <username> shell.sonic.net
>
>
> Call it something clever, make it executable, and have fun.
On that note:
#!/bin/sh
case $1 in
bolt) LOGIN=fryman; HOST=shell.sonic.net;;
rd) LOGIN=root; HOST=dubhe;;
dubhe) LOGIN=troy; HOST=dubhe;;
saiph) LOGIN=troy; HOST=saiph;;
qc) LOGIN=qc; HOST=shell.sonic.net;;
crime) LOGIN=root; HOST=sherlock.crimescene.com;;
stogie) LOGIN=troy; HOST=www.stogie.us;;
op4s) LOGIN=op4s; HOST=shell.sonic.net;;
z) LOGIN=root; HOST=zaurus;;
*) echo "Unknown arg"; exit 1;;
esac
ssh ${OPTIONS} -l $LOGIN $HOST
## end
I called this script 'rs' To log into Sonic's shell server as 'fryman' I do:
$ rs bolt
Likewise, to log into my zaurus:
$ rs z
Simple, but very useful to me -- and now you know some of my usernames. Happy
hacking ;-)
-troy
More information about the talk
mailing list