|
|
SSH to multiple boxes via tab completion
This kind of thing is what ~/.ssh/config is for. Very easy to use. For instance, to ssh into host1.somewhere.com as root you would add:
Then all you have to do is "ssh host1". Nice thing about this is you can set other options as well. For instance, I like to log into one of my webservers through a firewall that does port forwarding on a non-standard port to my webserver. I also need to ssh into the firewall box as well which is why I use a different port number, but I have it setup like this:
Now all I have to do is and I get logged in to port 2022 on the firewall host (10.0.5.4) which is forwarded to port 22 on the firewall. The HostKeyAlias and CheckHostIP clauses are necessary because otherwise ssh complains because I have the hostkey for 10.0.5.4 in ~/.ssh/known_hosts which is different from the host key for webserver ("web").
Use for more details, but I find using ~/.ssh/config for this kind of thing far more flexible than using bash aliases.
|
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.13 seconds |
|