Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Yet another method of creating SSH shortcuts' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Yet another method of creating SSH shortcuts
Authored by: Lutin on Nov 29, '06 06:48:40AM
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:
Host *.example.com
  User UserName
  ProxyCommand ssh -q box1
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?
Host (*).example.com
	User UserName
	ProxyCommand ssh -q \1


[ Reply to This | # ]