[TriLUG] SSHD listen on external interface ONLY

Alan Porter porter at trilug.org
Tue Nov 28 14:44:48 EST 2006


JM> ListenAddress 0.0.0.0 #address sshd listens on,

"ListenAddress" is not the option I want to change. It tells the main
sshd where to listen for ssh connections. I am trying to change the
address where a tunnel's child sshd listens for port forwarding
purposes.

But this got me digging. It looks like I should be able to say something
like:

ssh -R 123.45.67.89:25:localhost:25 root at remote.domain.com -g -N &

or

ssh -R 123.45.67.89/25/localhost/25 root at remote.domain.com -g -N &

This tells sshd on the remote side to bind to 123.45.67.89, and not
all interfaces. However, I have tried a few experiments and I can't
get it to work. When I try, it still listens on all interfaces. I'll play
with my sshd_config file on the remote server as well.


Alan






More information about the TriLUG mailing list