|
|
Yet another method of creating SSH shortcuts
If you have a 'bastion' server that you have to hop through at work to get anywhere, here is an easy way to do that automatically:
Host bastion HostName bastion.example.com User username Port 222 Host *.example.com User username ProxyCommand ssh -q bastion "nc %h %p"Now ssh to web001.example.com and it'll automatically bounce through bastion. This hint requires nc (aka netcat) on the bastion host. It also helps if your keys are setup correctly and you are forwarding your agent. -Dave
Yet another method of creating SSH shortcuts
To log from outside into my school, I have to go through the school ssh gate.
We're not allowed to execute anything on the gate - except a command that list all available machines. To prevent forgotting to log on an "inside machine" I have an alias that log on the gate, then, using the command parameter of the ssh command, log me on an other machine. I like this hint, because everything is down into one config file and don't pollute my alias. So, assuming you want to connect to a machine named box1, I suppose you could simplify and edit your config file like this:
I doesn't require netcat.
I can 't test it (I'm at work on a **** Windows PC) and will edit it tonight if required.On an other side, with my alias, I could specify when excuting it, to which inside box I want to connect (in case of the hard coded one is down). Would someone know a way to transform the config file to something along those lines?
|
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks 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.09 seconds |
|