April 27, 2004

Multihop ssh

I have to go through a gateway box to get to various production boxes; this gets rather tiresome because you end up doing things like:

ssh gateway
enter password<ENTER>
ssh boxireallywanted
enter password<ENTER>

Do this a few thousand times and it starts to get old. Being slightly clever, I’d tried ssh gateway ssh boxiwant, but that doesn’t work because a tty isn’t allocated so password entry can’t happen (and keys aren’t possible for me). Today, I finally found the magic should-have-known-it command line magic to fix this - -t:

ssh -t gateway ssh -t boxireallywanted

Enter both passwords and you’re in. This makes it possible to set up window manager shortcuts for the various boxes I need to get to.

Yes, this qualifies as excitement in my world.

Posted by Bill Stilwell at April 27, 2004 10:35 AM
Comments