SSHログインとログアウトが遅い、「チャンネルでシェル要求が許可されています」

SSHログインとログアウトが遅い、「チャンネルでシェル要求が許可されています」

遅いSSHログインの問題があります。サーバーは(wgetを介して)高速ですが、シェルがポップアップするのに15秒かかります。

そのため、-vvオプションを使用してsshを起動しましたが、ptyリクエストにハングしていることがわかりました。

debug2: channel 0: request env confirm 0
debug2: channel 0: request shell confirm 1
debug2: channel_input_open_confirmation: channel 0: 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  <-- stuck for 15s

最初はそれがbashプロファイルであると思いましたが、-x/ etc / profileに追加しても役に立たず、コンソールに何も印刷されませんでした。ただし、^ Cを押すと、コンソールに多くの出力が印刷されます。

シェルを終了すると、約10秒間停止し、次の行が印刷されます。

debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype [email protected] reply 0
debug2: channel 0: rcvd eow
debug2: channel 0: chan_shutdown_read (i0 o0 sock -1 wfd 8 efd 10 [write])
debug2: channel 0: input open -> closed
debug2: channel 0: rcvd eof
debug2: channel 0: output open -> drain
debug2: channel 0: obuf empty
debug2: channel 0: chan_shutdown_write (i3 o1 sock -1 wfd 9 efd 10 [write])
debug2: channel 0: output drain -> closed
debug2: channel 0: rcvd close
debug2: channel 0: almost dead
debug2: channel 0: gc: notify user
debug2: channel 0: gc: user detached
debug2: channel 0: send close
debug2: channel 0: is dead
debug2: channel 0: garbage collecting
debug1: channel 0: free: client-session, nchannels 1
Connection to xxxx closed.
Transferred: sent 3296, received 2720 bytes, in 78.5 seconds
Bytes per second: sent 42.0, received 34.7
debug1: Exit status 0

この問題をデバッグする方法を知っている人はいますか?今は全くわかりません。

ベストアンサー1

有効なネームサーバーを使用しているか、UseDNS noまたは/etc/ssh/sshd_config

おすすめ記事