error: Bind to port 22

Olu Akins b.akins at verizon.net
Mon Apr 26 18:39:51 UTC 2004


Jason Montleon wrote:

>Well port 22 is generally used by ssh, but it appears that you have another
>program that wants to listen on port 22 as well (you can only have one;
>unless you intend to have each program listen on a different interfaces,
>rather than having both try and listen on all.)
>
>Your search 'lsof -i tcp |grep 22', was lucky in that the device number was
>2252 and you caught the line; *:ssh is the address (*:ssh); all
>interface/addresses on port ssh; port 22 was resolved to ssh, as far as I
>know because it is listed in /etc/services:
>
>ssh             22/tcp                          # SSH Remote Login Protocol
>ssh             22/udp                          # SSH Remote Login Protocol
>
>and sshd (on the far left) is the command that was run and is now listening
>on port 22.
>
>As for what to do; you can disable sshd using system-config-services and
>reboot; don't do this if you're connecting remotely through ssh.  When you
>reboot you'll've cut yourself off; do it at the system.  Run 'lsof -i' and
>see what's trying to listen on 22/ssh.  Then you need to make up your mind.
>Should it be trying to listen.  If not find out where it is trying to start
>from and disable it.  If so which one do you want to keep listening on port
>22 (or on port 22 on which interfaces) and which one are you going to have
>listen on a different port (or interface)...
>
>This should hopefully at least get your started in the right direction...
>
>Did you per chance try to install some version of ssh after installing
>Fedora with the version of ssh that comes with it and is enabled by default?
>
>Jason
>
>
>
>
>  
>
>>While checking my security logs, I noticed this error
>>    
>>
>
>  
>
>>error: Bind to port 22 on 0.0.0.0 failed: Address already in use.
>>    
>>
>
>  
>
>>after doing a search, I ran lsof to show the process occupying the port and
>>    
>>
>this is what I found
>
>  
>
>>[root]# lsof -i tcp |grep 22
>>cupsd 831 root 0u IPv4 2232 TCP localhost.localdomain:ipp (LISTEN)
>>sshd 1019 root 3u IPv4 2252 TCP *:ssh (LISTEN)
>>    
>>
>
>  
>
>>Is this something I can ignore?
>>    
>>
>
>
>  
>
After running lsof -i, the result is
COMMAND    PID    USER   FD   TYPE DEVICE SIZE NODE NAME
portmap    685     rpc    3u  IPv4   1966       UDP *:sunrpc
portmap    685     rpc    4u  IPv4   1967       TCP *:sunrpc (LISTEN)
rpc.statd  705 rpcuser    4u  IPv4   1999       UDP *:32768
rpc.statd  705 rpcuser    5u  IPv4   1991       UDP *:881
rpc.statd  705 rpcuser    6u  IPv4   2002       TCP *:32770 (LISTEN)
cupsd      863    root    0u  IPv4   2311       TCP 
localhost.localdomain:ipp (LISTEN)
cupsd      863    root    2u  IPv4   2312       UDP *:ipp
sshd      1052    root    3u  IPv4   2331       TCP *:ssh (LISTEN)
xinetd    1069    root    5u  IPv4   2400       TCP 
localhost.localdomain:32771 (LISTEN)
sendmail  1092    root    4u  IPv4   2417       TCP 
localhost.localdomain:smtp (LISTEN)

and running lsof -i tcp |grep 22 gives me nothing. I did not install 
FC2T2, I upgraded from FC2T1 to FC2T2





More information about the fedora-test-list mailing list