• This forum has a zero tolerance policy regarding spam. If you register here to publish advertising, your user account will be deleted without further questions.

SSH-Login quälend langsam

  • Thread starter Deleted member 14422
  • Start date
D

Deleted member 14422

Guest
Hi Leute,

ich bin am verzweifeln. Ich habe hier einen OpenVZ-Container, bei dem der SSH-Login quälend langsam ist und ich komme dem Problem einfach nicht auf die Schliche. Andere VZ-Container auf dem selben Host funktionieren problemlos.

ssh -vvvvv $hostname zeigt folgendes:
Code:
debug1: Authentication succeeded (publickey).
Authenticated to $hostname ([$IP]:$PORT).
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.

Dann dauert es mindestens eine Minute, bis mir die Session eröffnet wird:

Code:
debug2: callback start
debug2: fd 3 setting TCP_NODELAY
debug3: packet_set_tos: set IP_TOS 0x10
debug2: client_session2_setup: id 0
debug2: channel 0: request pty-req confirm 1
debug1: Sending environment.
debug3: Ignored env TERM
debug3: Ignored env SHELL
debug3: Ignored env SSH_CLIENT
debug3: Ignored env SSH_TTY
debug3: Ignored env USER
debug3: Ignored env LS_COLORS
debug3: Ignored env MAIL
debug3: Ignored env PATH
debug3: Ignored env PWD
debug1: Sending env LANG = en_US.UTF-8
debug2: channel 0: request env confirm 0
debug3: Ignored env PS1
debug3: Ignored env SHLVL
debug3: Ignored env HOME
debug3: Ignored env LANGUAGE
debug3: Ignored env LS_OPTIONS
debug3: Ignored env LOGNAME
debug3: Ignored env SSH_CONNECTION
debug3: Ignored env _
debug2: channel 0: request shell confirm 1
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel_input_status_confirm: type 99 id 0
debug2: PTY allocation request accepted on channel 0
debug2: channel 0: rcvd adjust 2097152
debug2: channel_input_status_confirm: type 99 id 0
debug2: shell request accepted on channel 0

Die /etc/ssh/sshd_config sieht so aus:
Code:
Port 22
Protocol 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
UsePrivilegeSeparation yes

KeyRegenerationInterval 3600
ServerKeyBits 1024

SyslogFacility AUTH
LogLevel INFO

LoginGraceTime 120
PermitRootLogin without-password
StrictModes yes

RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile      %h/.ssh/authorized_keys

IgnoreRhosts yes
RhostsRSAAuthentication no
HostbasedAuthentication no

PermitEmptyPasswords no

ChallengeResponseAuthentication no

X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog no
TCPKeepAlive yes

Banner /etc/issue.net

AcceptEnv LANG LC_*

Subsystem sftp /usr/lib/openssh/sftp-server

UsePAM yes
UseDNS no

Ideen? Google ist nicht wirklich hilfreich hier...
 
Vielleicht ist die DNS-Auflösung innerhalb des Containers nicht richtig?

Temporär im SSH-Daemon einmal in die sshd_config "UseDNS no" und den sshd neustarten.

Gruß
Markus
 
Ups, da hat irgendwer was aus der Config geschnitten - UseDNS steht auf no, war mein erster Gedanke.

Edit: Doch nichts abgeschnitten, "UseDNS no" steht ja oben in der Config. ;)
 
Last edited by a moderator:
Nachtrag: der sshd sagt während dem Login folgendes...

Code:
debug1: monitor_child_preauth: root has been authenticated by privileged process
debug1: monitor_read_log: child log fd closed
debug1: PAM: establishing credentials

Und hängt dann rund 30 Sekunden.
 
Irgendwas läuft in PAM auf einen Timeout, denn mit einem
Code:
UsePAM no
läuft's flüssig.
 
In dem Fall ist es vermutlich an der Zeit, sich mit strace an den Prozess zu klemmen und zu schauen wo er hängt.
 
Back
Top