Register
It is currently Sun Dec 21, 2014 4:33 pm

quik SSH/Telnet


All times are UTC - 6 hours


Post new topic Reply to topic  [ 1 post ] 
Author Message
 PostPosted: Tue May 17, 2005 11:05 am   
Site Admin
User avatar

Joined: Sun May 15, 2005 9:36 pm
Posts: 673
Location: Des Moines, Iowa
Originally posted by Mekanik
Quote:
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...



Code:
create the file ssh-to and add the below 2 lines
  #!/bin/bash
  ssh `basename $0` $*


chmod it to 755 or 700, whatever u like. then symlink your favorite server to the script.

Code:
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...


Code:
create the file telnet-to and add the below 2 lines
  #!/bin/bash
  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.

Code:
ln -s telnet-to router
ln -s telnet-to email



this can lead to endless possibilities, :D

-mekanik


Top
 Profile WWW  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP