Solved: SSH tunnel question
Ben Scott
dragonhawk at gmail.com
Wed Feb 27 16:52:38 EST 2008
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.
-- Ben
More information about the gnhlug-discuss
mailing list