Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Secure-Shell
[Top] [All Lists]

Re: ssh -L syntax question

Subject: Re: ssh -L syntax question
Date: Fri, 14 Mar 2008 16:54:23 -0400
On Thu, Mar 13, 2008 at 02:29:16PM -0700, grandsatrap wrote:
What is the difference between ssh -L 2000:localhost:5900 frank@server.me.org
and 
ssh -L 2000:server.me.org:5900 frank@server.me.org ?

In the first one, the sshd on server.me.org will make connections to
localhost:5900.  Assuming IPv4, this will make connections to 127.0.0.1
port 5900.

In the second one, the sshd on server.me.org makes connections to
server.me.org:5900.  If we suppose the IP address of server.me.org
is 192.168.1.5, this means sshd will make connections to 192.168.1.5
port 5900.

This matters if the service running on port 5900 is bound only to a
single interface (e.g. the loopback interface, 127.0.0.1) instead of
all interfaces.  If the service is only listening on loopback, then
the first one will reach it, but the second one will not.

It may also affect the source IP address seen by the service, which
could matter if you filter connections by source IP, or log the source
IPs, etc.

<Prev in Thread] Current Thread [Next in Thread>