Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Reducing host entries in config file
July 7, 2010, 7:47 pm
rate this thread
Is there any way to replace many entries in ssh config file:
etc. with something like this ($1 is first parameter in bash):
Every time I execute ssh $number, ssh should connect with 10.1.0.$number.
I can't use domain names because they are very long (i-10-0-0-10) and
these hosts are in different domain than client host. Any ideas?
Re: Reducing host entries in config file
I don't know of any way to simplify the /contents/ of the ssh_config
However, if /building/ the ssh_config file is an issue, then you /
could/ just automate this portion of it....
for number in `seq 1 255` ;
echo Host $number >>ssh_config
echo " Hostname 10.1.0.$number" >>ssh_config
Master Codewright & JOAT-in-training | Registered Linux User #112576
Me: http://pitcher.digitalfreehold.ca/ | Just Linux: http://justlinux.ca /
---------- Slackware - Because I know what I'm doing.
- » PuTTY tunneling breaks php generated pages on windows vista/7
- — Previous thread in » Secure Shell Forum
- » protocol question - issue with exit-status inside unfinished data stream?
- — Newest thread in » Secure Shell Forum