우리 학교의 UNIX 서버에서 SSH 공개 키 인증을 할 수 없는 이유를 알아내려고 합니다. 분명히 루트 액세스 권한은 없지만 클라이언트 및 호스트 .ssh 디렉터리의 자세한 SSH 출력과 권한은 물론 키가 업로드되었음을 보여주는 ssh-copy-id를 첨부했습니다. 로컬의 id_rsa.pub 및 서버의authorized_keys 파일 내용이 정확히 일치합니다. 무엇을 고쳐야 합니까?
LOCALUSERNAME@LOCALUSERNAMEsMBP ~/.ssh ls -al
total 56
drwx------ 7 LOCALUSERNAME staff 224 May 27 20:01 ./
drwxr-xr-x@ 120 LOCALUSERNAME staff 3840 May 27 20:07 ../
-rw------- 1 LOCALUSERNAME staff 1766 Jun 3 2015 github_rsa
-rw-r--r-- 1 LOCALUSERNAME staff 399 Jun 3 2015 github_rsa.pub
-rw------- 1 LOCALUSERNAME staff 1675 Sep 8 2018 id_rsa
-rw-r--r-- 1 LOCALUSERNAME staff 401 Sep 8 2018 id_rsa.pub
-rw-r--r-- 1 LOCALUSERNAME staff 9244 May 25 21:01 known_hosts
ssh-copy-id MYUSERNAME@SERVER
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/Users/LOCALUSERNAME/.ssh/id_rsa.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
MYUSERNAME@SERVER's password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh 'MYUSERNAME@SERVER'"
and check to make sure that only the key(s) you wanted were added.
ssh -v MYUSERNAME@SERVER
OpenSSH_7.9p1, LibreSSL 2.7.3
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 48: Applying options for *
debug1: Connecting to SERVER port 22.
debug1: Connection established.
debug1: identity file /Users/LOCALUSERNAME/.ssh/id_rsa type 0
debug1: identity file /Users/LOCALUSERNAME/.ssh/id_rsa-cert type -1
debug1: identity file /Users/LOCALUSERNAME/.ssh/id_dsa type -1
debug1: identity file /Users/LOCALUSERNAME/.ssh/id_dsa-cert type -1
debug1: identity file /Users/LOCALUSERNAME/.ssh/id_ecdsa type -1
debug1: identity file /Users/LOCALUSERNAME/.ssh/id_ecdsa-cert type -1
debug1: identity file /Users/LOCALUSERNAME/.ssh/id_ed25519 type -1
debug1: identity file /Users/LOCALUSERNAME/.ssh/id_ed25519-cert type -1
debug1: identity file /Users/LOCALUSERNAME/.ssh/id_xmss type -1
debug1: identity file /Users/LOCALUSERNAME/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.9
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4
debug1: match: OpenSSH_7.4 pat OpenSSH_7.0*,OpenSSH_7.1*,OpenSSH_7.2*,OpenSSH_7.3*,OpenSSH_7.4*,OpenSSH_7.5*,OpenSSH_7.6*,OpenSSH_7.7* compat 0x04000002
debug1: Authenticating to SERVER:22 as 'MYUSERNAME'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:~~SOMESTRING~~
debug1: Host 'SERVER' is known and matches the ECDSA host key.
debug1: Found key in /Users/LOCALUSERNAME/.ssh/known_hosts:25
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 134217728 blocks
debug1: Will attempt key: /Users/LOCALUSERNAME/.ssh/id_rsa RSA SHA256:~~REDACTED ID_RSA~~
debug1: Will attempt key: /Users/LOCALUSERNAME/.ssh/id_dsa
debug1: Will attempt key: /Users/LOCALUSERNAME/.ssh/id_ecdsa
debug1: Will attempt key: /Users/LOCALUSERNAME/.ssh/id_ed25519
debug1: Will attempt key: /Users/LOCALUSERNAME/.ssh/id_xmss
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: publickey
debug1: Offering public key: /Users/LOCALUSERNAME/.ssh/id_rsa RSA SHA256:~~REDACTED ID_RSA~~
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Trying private key: /Users/LOCALUSERNAME/.ssh/id_dsa
debug1: Trying private key: /Users/LOCALUSERNAME/.ssh/id_ecdsa
debug1: Trying private key: /Users/LOCALUSERNAME/.ssh/id_ed25519
debug1: Trying private key: /Users/LOCALUSERNAME/.ssh/id_xmss
debug1: Next authentication method: password
MYUSERNAME@SERVER's password:
MYUSERNAME@SERVER ~/.ssh ls -al
total 7
drwx------ 2 MYUSERNAME users 2048 Sep 8 2018 .
drwxr-xr-x 21 MYUSERNAME wheel 4096 May 27 20:07 ..
-rw------- 1 MYUSERNAME users 802 May 27 20:01 authorized_keys