On Thu, 17 Aug 2000, Cole Tuininga wrote:
> Perhaps somebody can thwack me and tell me what I'm doing wrong here.
> 
> I'm running sshd which binds to port 22.  As root I execute:
> 
> # netstat -np | grep 22
> 
> And while this shows the couple of machines that I've ssh'd TO (remote
> port 22), it doesn't list my sshd which is bound to my local port 22. 
> Why is that?

  You need to specify the "-l" switch as well, otherwise, netstat will only
include connected sockets, not listening sockets.  Another useful switch is
"-a", which shows *all* sockets.

On Thu, 17 Aug 2000, Thomas Charron wrote:
> netstat will list the local service name if it is listed in the servives
> file.  instead, grep for ssh.  Here's mine:

  He was using the "-n" switch, which means it would show up as "22", not
"ssh", since "-n" disables all name resolution.

> -n unfortionatly, also makes the display not show host names, but instead,
> actual IP's.

  This is very useful when DNS is down, as it often is if you are using
network trouble-shooting tools!  Besides, all good admins know every IP
address they use by heart.  Real men don't need DNS.  ;-)

-- 
Ben Scott <[EMAIL PROTECTED]>
Net Technologies, Inc. <http://www.ntisys.com>
Voice: (800)905-3049 x18   Fax: (978)499-7839


**********************************************************
To unsubscribe from this list, send mail to
[EMAIL PROTECTED] with the following text in the
*body* (*not* the subject line) of the letter:
unsubscribe gnhlug
**********************************************************

Reply via email to