사용자 비밀번호를 입력하지 않고 서버에 로그인

사용자 비밀번호를 입력하지 않고 서버에 로그인

ssh-key 비밀번호를 입력해서 서버에 들어가고 싶었는데 이제 사용자 서버의 비밀번호를 입력하게 되었어요

서버에 맞게 공개 키를 조정했지만 ssh-copy-id여전히 비밀번호를 입력하라는 메시지가 표시됩니다.

고객:cat .ssh/config

Host alimd
    HostName srv1.mihandoost.com
    Port 22

Host *
    Compression yes
    User root
    HostKeyAlgorithms=+ssh-rsa
    IdentityFile ~/.ssh/id_rsa

섬기는 사람:cat /etc/ssh/sshd_config

PATH=/usr/local/sbin:/usr/local/bin:/usr/bin
PermitRootLogin yes
PubkeyAuthentication yes
AuthorizedKeysFile      .ssh/authorized_keys
PasswordAuthentication yes
KbdInteractiveAuthentication no
UsePAM yes
PrintMotd no
Subsystem       sftp    /usr/lib/ssh/sftp-server

고객:ssh -vvv [email protected]

debug1: load_hostkeys: fopen /home/njfamirm/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: Host 'srv1.mihandoost.com' is known and matches the ED25519 host key.
debug1: Found key in /home/njfamirm/.ssh/known_hosts:12
debug3: send packet: type 21
debug2: ssh_set_newkeys: mode 1
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: receive packet: type 21
debug1: SSH2_MSG_NEWKEYS received
debug2: ssh_set_newkeys: mode 0
debug1: rekey in after 134217728 blocks
debug1: get_agent_identities: bound agent to hostkey
debug1: get_agent_identities: agent returned 1 keys
debug1: Will attempt key: /home/njfamirm/.ssh/id_rsa RSA SHA256:mvtTfk3TDAkKFPtV4ReA9pvcMwDLlkCU3RpqsPfu3SM explicit agent
debug2: pubkey_prepare: done
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,[email protected],ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected]>
debug1: kex_input_ext_info: [email protected]=<0>
debug3: receive packet: type 6
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug3: start over, passed a different list publickey,password,keyboard-interactive
debug3: preferred 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 public key: /home/njfamirm/.ssh/id_rsa RSA SHA256:mvtTfk3TDAkKFPtV4ReA9pvcMwDLlkCU3RpqsPfu3SM explicit agent
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug2: we did not send a packet, disable method
debug3: authmethod_lookup keyboard-interactive
debug3: remaining preferred: password
debug3: authmethod_is_enabled keyboard-interactive
debug1: Next authentication method: keyboard-interactive
debug2: userauth_kbdint
debug3: send packet: type 50
debug2: we sent a keyboard-interactive packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug3: userauth_kbdint: disable: no info_req_seen
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred:
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
[email protected]'s password:

감사해요!

관련 정보