Originally posted by Mekanik
here's some small scripts and symlinks to use for quik logins to servers, routers, switches, firewalls, etc, etc, etc...via ssh/telnet...this was (well the SSH portion) from the o'reilly - linux server hacks book...
create the file ssh-to and add the below 2 lines
ssh `basename $0` $*
chmod it to 755 or 700, whatever u like. then symlink your favorite server to the script.
ln -s ssh-to server1
ln -s ssh-to server2
ln -s ssh-to server3
then just run server1 uptime
which will output the uptime on the remote server w/out spawing a shell on it. or you can run server1
to end up with a shell on the remote server. **note** you'll need to copy your public key to the remote server to end up with the shell with out typing a uid/pwd...
create the file telnet-to and add the below 2 lines
telnet `basename $0` $*
chmod this one also to your liking, then symlink it and just run router
and a telnet session will spawn to your router. you can also run email 110
and you can then run POP3 testing manually.
ln -s telnet-to router
ln -s telnet-to email
this can lead to endless possibilities,