Ubuntu 16.04의 sshd - 로그인 시간이 매우 오래 걸림

Ubuntu 16.04의 sshd - 로그인 시간이 매우 오래 걸림

과거에는 SSH 로그인에 몇 초가 걸리는 것을 여러 번 보았습니다. 나는 항상 그것이 부적절하다고 생각했습니다. Xubuntu 16.04를 사용하여 워크스테이션을 다시 설치한 후 이 효과는 정말 파괴적이었습니다. 동일한 LAN에 있는 두 워크스테이션 사이에서 SSH 로그인에 10초 이상이 소요됩니다. 그 후에는 모든 것이 빠릅니다.

내 라우터를 통해 기계는 DNS를 통해 즉시 서로를 찾을 수 있습니다. 그러나 나는 또한 UseDNS no. 나는 또한 GSSAPIAuthentication no웹에서 찾은대로 시도했습니다. 둘 다 효과가 없었습니다.

공개 키를 통해 인증합니다.

다음은 SSH 클라이언트의 디버그 출력 조각입니다.

debug1: Authentications that can continue: publickey,password
debug3: start over, passed a different list publickey,password
debug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/pino/.ssh/ids/heisterkamp/22/pino
debug3: send_pubkey_test
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 60
debug1: Server accepts key: pkalg rsa-sha2-512 blen 279
debug2: input_userauth_pk_ok: fp XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
debug3: sign_and_send_pubkey: RSA XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
debug3: send packet: type 50
debug3: receive packet: type 52
debug1: Authentication succeeded (publickey).
Authenticated to heisterkamp ([fd00::8d93:c17b:595a:347f]:22).
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug3: send packet: type 90
debug1: Requesting [email protected]
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: exec

이제 문제는 10초 동안 '잠자기' 상태입니다. 이후에는 다음과 같이 계속됩니다.

debug1: client_input_global_request: rtype [email protected] want_reply 0
debug3: receive packet: type 91
debug2: callback start
debug2: x11_get_proto: /usr/bin/xauth  list :0.0 2>/dev/null
debug1: Requesting X11 forwarding with authentication spoofing.
debug2: channel 0: request x11-req confirm 1
debug3: send packet: type 98
debug2: fd 3 setting TCP_NODELAY
debug3: ssh_packet_set_tos: set IPV6_TCLASS 0x10
debug2: client_session2_setup: id 0
debug2: channel 0: request pty-req confirm 1
debug3: send packet: type 98
debug1: Sending environment.
...

기다리는 시간의 이유가 무엇인지 아는 사람이 있습니까?

편집: 언급할 만한 몇 가지 세부 사항이 더 있습니다.

  • 내 워크스테이션을 사용하여 동일한 네트워크에 있는 다른 데비안 컴퓨터에 로그인하면 1초밖에 걸리지 않습니다.
  • 로그인 시 luks 암호화 볼륨을 마운트하도록 pam_mount를 구성했습니다. 그러나 내 상황에서는 이 볼륨이 이미 마운트되어 있습니다. 그리고 마운트가 해제되더라도 마운트하는 데는 약 3초 정도 소요됩니다.

답변1

같은 문제입니다. 10초 지연 후에 다음을 볼 수 있습니다. "'org.freedesktop.login1' 서비스 활성화 실패: 시간 초과" auth.log에서

해결책:

systemctl restart systemd-logind

그것을 발견여기

답변2

제 경우에는 "debug1: promise: exec"에 멈추는 문제가 해결되었습니다.

apt install --reinstall systemd

관련 정보