PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > comp.security.ssh > error: bind: Address already in use
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.security.ssh SSH secure remote login and tunneling tools.

error: bind: Address already in use

Réponse
 
LinkBack Outils de la discussion
Vieux 21/08/2007, 20h34   #1
Doesnt Compute
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut error: bind: Address already in use

I'm confused by this error from sshd. Here is the setup:

Tru64 Unix 5.1B-4, opensshd compiled from source:
# sshd -V
sshd: illegal option -- V
OpenSSH_4.6p1, OpenSSL 0.9.7b 10 Apr 2003
usage: sshd [-46Ddeiqt] [-b bits] [-f config_file] [-g
login_grace_time]
[-h host_key_file] [-k key_gen_time] [-o option] [-p port]
[-u len]

Envocation is via: /usr/local/sbin/sshd -4 -f /usr/local/etc/
sshd_config

Using -4 to force IPv4 and deny IPv6 hoping this would prevent the
above message. It did not.

Any clues?

Thanks,
Robert

  Réponse avec citation
Vieux 21/08/2007, 22h09   #2
Richard E. Silverman
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: error: bind: Address already in use

>>>>> "DC" == Doesnt Compute <doesntcompute2k@gmail.com> writes:

DC> I'm confused by this error from sshd. Here is the setup: Tru64
DC> Unix 5.1B-4, opensshd compiled from source: # sshd -V sshd:
DC> illegal option -- V OpenSSH_4.6p1, OpenSSL 0.9.7b 10 Apr 2003
DC> usage: sshd [-46Ddeiqt] [-b bits] [-f config_file] [-g
DC> login_grace_time] [-h host_key_file] [-k key_gen_time] [-o option]
DC> [-p port] [-u len]

DC> Envocation is via: /usr/local/sbin/sshd -4 -f /usr/local/etc/
DC> sshd_config

DC> Using -4 to force IPv4 and deny IPv6 hoping this would prevent the
DC> above message. It did not.

DC> Any clues?

DC> Thanks, Robert

It means you already have an sshd running, or something else which is
listening on the same port.

--
Richard Silverman
res@qoxp.net

  Réponse avec citation
Vieux 23/08/2007, 07h04   #3
Doesnt Compute
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: error: bind: Address already in use

Thanks for the reply.

I checked that. Moved from (old) HP SSHD to current version and
wanted to make sure the old was dead and gone.

The issue it seems is related to the desktop application (Genaro
Desktop Client program) having issues specifying a port or trying too.
Putty works fine, Genaro using part of the callable putty routines has
the issue.

In case anyone knows of some magic to get rid of this...I'm checking
out all info I can get on this desktop app and trying to work that
angle.

Four lines of (extra, useless) logging every time someone logs in is
not going to "kill us," but sure is annoying. LOL

FYI:

#
# netstat -n | grep "\.22" | tr -s ' ' | tr ' ' ','
tcp,0,0,10.1.2.10.22,10.6.3.218.2638,ESTABLISHED
tcp,0,0,10.1.2.10.22,10.3.3.79.3053,ESTABLISHED
tcp,0,0,10.1.2.10.22,10.4.3.149.2762,ESTABLISHED
tcp,0,0,*.22,*.*,LISTEN
#
#
#
# lsof -i:22
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
sshd 1090 root 3u IPv4 0x6e69e640 0t0 TCP *:ssh (LISTEN)
sshd 4283 root 3u IPv4 0x7131c500 0t0 TCP mynode:ssh-
>hrguidance-03.local:2638 (ESTABLISHED)

sshd 11304 root 3u IPv4 0x05da2000 0t0 TCP mynode:ssh-
>wef100-05.local:3053 (ESTABLISHED)

sshd 69248 root 3u IPv4 0x024ac500 0t0 TCP mynode:ssh-
>sc10007:2762 (ESTABLISHED)

#
#
# ps -fp1090 | tr -s ' '
UID PID PPID C STIME TTY TIME CMD
root 1090 1 0.0 Aug 21 ?? 0:04.24 /usr/local/sbin/sshd -4 -f /usr/
local/etc/sshd_config


On Aug 21, 4:09 pm, "Richard E. Silverman" <r...@qoxp.net> wrote:
>
> It means you already have an sshd running, or something else which is
> listening on the same port.
>
> --
> Richard Silverman
> r...@qoxp.net



  Réponse avec citation
Vieux 23/08/2007, 17h45   #4
Darren Dunham
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: error: bind: Address already in use

Doesnt Compute <doesntcompute2k@gmail.com> wrote:
> I checked that. Moved from (old) HP SSHD to current version and
> wanted to make sure the old was dead and gone.


It (or something like it) is still there. That's why port 22 is still
in use.

> The issue it seems is related to the desktop application (Genaro
> Desktop Client program) having issues specifying a port or trying too.
> Putty works fine, Genaro using part of the callable putty routines has
> the issue.


Hmm? Putty is a client. You're asking about sshd (a server). I don't
understand the connection.

> In case anyone knows of some magic to get rid of this...I'm checking
> out all info I can get on this desktop app and trying to work that
> angle.
>
> Four lines of (extra, useless) logging every time someone logs in is
> not going to "kill us," but sure is annoying. LOL


What lines are you talking about, the "Address already in use"? Why is
something trying to start an sshd process every time someone logs in?

> FYI:
>
> #
> # netstat -n | grep "\.22" | tr -s ' ' | tr ' ' ','
> tcp,0,0,10.1.2.10.22,10.6.3.218.2638,ESTABLISHED
> tcp,0,0,10.1.2.10.22,10.3.3.79.3053,ESTABLISHED
> tcp,0,0,10.1.2.10.22,10.4.3.149.2762,ESTABLISHED
> tcp,0,0,*.22,*.*,LISTEN
> #
> #
> #
> # lsof -i:22
> COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
> sshd 1090 root 3u IPv4 0x6e69e640 0t0 TCP *:ssh (LISTEN)


There you go. PID 1090 is a running sshd, listening on port 22. You
can't run another sshd and listen on the same port or you'll get the
"address already in use" message, and the launched server will exit.

> # ps -fp1090 | tr -s ' '
> UID PID PPID C STIME TTY TIME CMD
> root 1090 1 0.0 Aug 21 ?? 0:04.24 /usr/local/sbin/sshd -4 -f /usr/
> local/etc/sshd_config


Same process. That's what you were trying to run, but presumably it's
already running. Only one can listen to a port at a time.

--
Darren Dunham ddunham@taos.com
Senior Technical Consultant TAOS http://www.taos.com/
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
  Réponse avec citation
Vieux 23/08/2007, 20h49   #5
Per Hedeland
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: error: bind: Address already in use

In article <1187849058.353157.40790@m37g2000prh.googlegroups. com> Doesnt
Compute <doesntcompute2k@gmail.com> writes:
>
>The issue it seems is related to the desktop application (Genaro
>Desktop Client program) having issues specifying a port or trying too.
>Putty works fine, Genaro using part of the callable putty routines has
>the issue.


Where are you seeing the error message? If in a syslog file
(e.g. /var/log/messages) it should also have the pid of the reporter,
allowing you to determine whether it comes from the already running sshd
or another instance trying to start, as claimed by others.

The error will also be reported if a client requests a reverse port
forwarding from a port that is in use by some other process - e.g.

onehost $ ssh -R6000:localhost:1234 otherhost
otherhost $

- succeeds, but on otherhost this is found in the log:

Aug 23 21:43:24 otherhost sshd[90398]: error: bind: Address already in use
Aug 23 21:43:24 otherhost sshd[90398]: error: channel_setup_fwd_listener: cannot listen to port: 6000

(Port 6000 here is in use by the X server on otherhost of course - just
an example.)

--Per Hedeland
per@hedeland.org
  Réponse avec citation
Vieux 23/08/2007, 21h03   #6
Per Hedeland
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: error: bind: Address already in use

In article <fakoci$12ut$1@hedeland.org> per@hedeland.org (Per Hedeland) writes:
>In article <1187849058.353157.40790@m37g2000prh.googlegroups. com> Doesnt
>Compute <doesntcompute2k@gmail.com> writes:
>>
>>The issue it seems is related to the desktop application (Genaro
>>Desktop Client program) having issues specifying a port or trying too.
>>Putty works fine, Genaro using part of the callable putty routines has
>>the issue.

>
>Where are you seeing the error message? If in a syslog file
>(e.g. /var/log/messages) it should also have the pid of the reporter,
>allowing you to determine whether it comes from the already running sshd
>or another instance trying to start, as claimed by others.


Oops, that's not true of course, it will never come from the daemon
process since it will fork() before anything is done with the connection.

>The error will also be reported if a client requests a reverse port
>forwarding from a port that is in use by some other process


I still believe this is the most likely cause if it is triggered by a
client connection, and if you get the

>Aug 23 21:43:24 otherhost sshd[90398]: error:
>channel_setup_fwd_listener: cannot listen to port: 6000


message, there's no doubt. Not sure if all versions of sshd will log
this message though - if you don't see it, running sshd in debug mode
may provide more clues.

--Per Hedeland
per@hedeland.org
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 22h58.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,15432 seconds with 14 queries