![SSH: 공개 키 인증을 시도할 때 시스템이 개인 키를 제공하는 이유는 무엇입니까? [폐쇄]](https://linux55.com/image/95181/SSH%3A%20%EA%B3%B5%EA%B0%9C%20%ED%82%A4%20%EC%9D%B8%EC%A6%9D%EC%9D%84%20%EC%8B%9C%EB%8F%84%ED%95%A0%20%EB%95%8C%20%EC%8B%9C%EC%8A%A4%ED%85%9C%EC%9D%B4%20%EA%B0%9C%EC%9D%B8%20%ED%82%A4%EB%A5%BC%20%EC%A0%9C%EA%B3%B5%ED%95%98%EB%8A%94%20%EC%9D%B4%EC%9C%A0%EB%8A%94%20%EB%AC%B4%EC%97%87%EC%9E%85%EB%8B%88%EA%B9%8C%3F%20%5B%ED%8F%90%EC%87%84%5D.png)
서버에 연결을 시도 중입니다. 해당 서버에 로그인하기 위한 개인 키를 받아 id_rsa에 추가했지만 클라이언트는 이를 id_rsa.pub 대신 공개 키로 계속 전달하려고 합니다. id_rsa.pub가 내 ssh_config 파일에 없기 때문입니까?
서버 연결 시도
debug1: Offering RSA public key: /root/.ssh/id_rsa
debug3: send_pubkey_test
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
SSH 구성 파일(ID 섹션)
root@etoorlan4c:~/.ssh# cat /etc/ssh/ssh_config
# StrictHostKeyChecking ask
# IdentityFile ~/.ssh/identity
# IdentityFile ~/.ssh/id_rsa
~/.ssh/의 내용
root@etoorlan4c:~/.ssh# ls
authorized_keys id_rsa id_rsa.pub known_hosts
답변1
개인 키가 유효하지 않습니다. 한 문자가 누락되었습니다. 유효한 개인 키를 사용하면 출력이 다음과 같이 변경됩니다.
debug1: Offering RSA public key: root@etoorlan4c
debug3: send_pubkey_test
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
debug1: Trying private key: sshkey.private
debug3: sign_and_send_pubkey: RSA SHA256:jmMyCOppv3KKkRgiHI4s5h3I7LwyCgms8uSG06KClQ4
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 52
debug1: Authentication succeeded (publickey).
Authenticated to [remoteHost]([xxx.xxx.xxx.xxx]:22).