Solved: SSH tunnel question

Steven W. Orr steveo at syslang.net
Wed Feb 27 17:38:42 EST 2008


On Wednesday, Feb 27th 2008 at 16:52 -0000, quoth Ben Scott:

=>On Wed, Feb 27, 2008 at 4:18 PM, Paul Lussier <p.lussier at comcast.net> wrote:
=>>  And you could simplify all this by setting up a specific key on the
=>>  remote side to exec the specific command you want.
=>
=>  As I understand it, he's not looking to execute *any* command (even
=>a shell) on the remote (home, in this case).  He's just looking to
=>establish a long-term SSH session from work to home, so that he can
=>later use it to tunnel SSH-over-SSH, from home back to work.
=>
=>  What he may want to do is create convenience entires in
=>$HOME/.ssh/config for each of these connections.  For example, on his
=>work computer, he might have an entry like:
=>
=>	Host backdoor
=>	HostName foo.syslang.net
=>	User steveo
=>	BatchMode yes
=>	ExitOnForwardFailure yes
=>	PasswordAuthentication no
=>	RemoteForward 2222 localhost:22
=>
=>And then, on his home computer, he could do this:
=>
=>	Host work
=>	HostName localhost
=>	Port 2222
=>	User sorr
=>
=>  End result being, he can run "ssh -f -N backdoor &" on his work PC
=>to get thing started, and then run "ssh work" at home to make use of
=>the backdoor tunnel.
=>
=>  See ssh_config(1) for an explanation of the config file directives.

Bingo. That's exactly what I did. :-)

-- 
Time flies like the wind. Fruit flies like a banana. Stranger things have  .0.
happened but none stranger than this. Does your driver's license say Organ ..0
Donor?Black holes are where God divided by zero. Listen to me! We are all- 000
individuals! What if this weren't a hypothetical question?
steveo at syslang.net


More information about the gnhlug-discuss mailing list