현재 SSH(10.2)를 통해 서버에 연결하고 있는데 서버에 다시 SSH를 통해 연결하려고 하면 항상 오류가 발생합니다.connection closed
$ ssh -vvv [email protected]
OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017
debug1: Reading configuration data /home/kyz/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: resolving "10.2" port 22
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug2: KEX algorithms: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffiedebug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
om,[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,[email protected],zlib
debug2: compression stoc: none,[email protected],zlib
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug2: KEX algorithms: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffiedebug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected]: compression ctos: none,[email protected]
debug2: reserved 0
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug3: receive packet: type 31
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:F+ixWaVGWbpF3x/x6X7ArfGCX1KV8XFpXFdTwbPa5ew
debug3: hostkeys_foreach: reading file "/home/kyz/.ssh/known_hosts"
debug3: record_hostkey: found key type ECDSA in file /home/kyz/.ssh/known_hosts:72
debug3: load_hostkeys: loaded 1 keys from 10.2
debug3: hostkeys_foreach: reading file "/home/kyz/.ssh/known_hosts"
debug3: record_hostkey: found key type ECDSA in file /home/kyz/.ssh/known_hosts:73
debug3: load_hostkeys: loaded 1 keys from 10.0.0.2
debug1: Host '10.2' is known and matches the ECDSA host key.
debug1: Found key in /home/kyz/.ssh/known_hosts:72
debug3: send packet: type 21
debug2: set_newkeys: mode 1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: receive packet: type 21
debug1: SSH2_MSG_NEWKEYS received
debug2: set_newkeys: mode 0
debug1: rekey after 134217728 blocks
debug2: key: /home/kyz/.ssh/id_rsa (0x55d85774b100), agent
debug2: key: /home/kyz/.ssh/id_dsa ((nil))
debug2: key: /home/kyz/.ssh/id_ecdsa ((nil))
debug2: key: /home/kyz/.ssh/id_ed25519 ((nil))
debug3: send packet: type 5
debug3: receive packet: type 7
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
debug3: receive packet: type 6
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
Connection closed by 10.0.0.2 port 22
$ ssh -vvv 10.2
OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017
debug1: Reading configuration data /home/kyz/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "10.2" port 22
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.9
debug1: SSH2_MSG_KEXINIT sent
debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
om,[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,[email protected],zlib
debug2: compression stoc: none,[email protected],zlib
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug2: KEX algorithms: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffiedebug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,[email protected]
debug1: kex: algorithm: curve25519-sha256
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug3: receive packet: type 31
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:F+ixWaVGWbpF3x/x6X7ArfGCX1KV8XFpXFdTwbPa5ew
debug3: hostkeys_foreach: reading file "/home/kyz/.ssh/known_hosts"
debug3: record_hostkey: found key type ECDSA in file /home/kyz/.ssh/known_hosts:72
debug3: load_hostkeys: loaded 1 keys from 10.2
debug3: hostkeys_foreach: reading file "/home/kyz/.ssh/known_hosts"
debug3: record_hostkey: found key type ECDSA in file /home/kyz/.ssh/known_hosts:73
debug3: load_hostkeys: loaded 1 keys from 10.0.0.2
debug1: Host '10.2' is known and matches the ECDSA host key.
debug1: Found key in /home/kyz/.ssh/known_hosts:72
debug3: send packet: type 21
debug2: set_newkeys: mode 1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: receive packet: type 21
debug1: SSH2_MSG_NEWKEYS received
debug2: set_newkeys: mode 0
debug1: rekey after 134217728 blocks
debug2: key: /home/kyz/.ssh/id_rsa (0x55e7b3e58100), agent
debug2: key: /home/kyz/.ssh/id_dsa ((nil))
debug2: key: /home/kyz/.ssh/id_ecdsa ((nil))
debug2: key: /home/kyz/.ssh/id_ed25519 ((nil))
debug3: send packet: type 5
debug3: receive packet: type 7
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
debug3: receive packet: type 6
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
Connection closed by 10.0.0.2 port 22
홈 디렉터리는 올바른 권한으로 존재하고 /etc/passwd
올바른 홈 디렉터리를 가리키며 /bin/bash
존재하고 실행 가능합니다.
SSH가 다음을 시도할 때 서버의 Journalctl:
Feb 16 19:26:48 f9988 audit[32203]: SECCOMP auid=4294967295 uid=99 gid=99 ses=4294967295 pid=32203 comm="sshd" exe="/usr/bin/sshd" sig=31 arch=c000003e syscall=230 compat=0 ip=0x7fb92538427e code=0x0
Feb 16 19:26:48 f9988 audit[32203]: ANOM_ABEND auid=4294967295 uid=99 gid=99 ses=4294967295 pid=32203 comm="sshd" exe="/usr/bin/sshd" sig=31 res=1
Feb 16 19:26:48 f9988 kernel: audit: type=1326 audit(1581856008.775:6156): auid=4294967295 uid=99 gid=99 ses=4294967295 pid=32203 comm="sshd" exe="/usr/bin/sshd" sig=31 arch=c000003e syscall=230 compat=0 ip=0x7fb92538427e code=0x0
Feb 16 19:26:48 f9988 kernel: audit: type=1701 audit(1581856008.775:6157): auid=4294967295 uid=99 gid=99 ses=4294967295 pid=32203 comm="sshd" exe="/usr/bin/sshd" sig=31 res=1
구성은 /etc/ssh/sshd_config
다음과 같습니다.
AuthorizedKeysFile .ssh/authorized_keys
ChallengeResponseAuthentication no
UsePAM yes
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no # pam does that
Subsystem sftp /usr/lib/ssh/sftp-server
서버의 SSH 버전OpenSSH_7.9p1, OpenSSL 1.1.1a 20 Nov 2018
이 문제를 일으키는 부분을 이해하려면 어떤 다른 로그를 확인해야 합니까?
편집하다분명히 전체 업그레이드( pacman -Syu
) 후에 모든 것이 제대로 작동하기 시작했고 문제의 가능한 원인은 내가 제거한 것과 xorg-server
다른 것 때문이었습니다.물건