![Ubuntu 20.04에서 업데이트 후 기본 SSH ID 키 파일이 삭제되었습니다.](https://linux55.com/image/199123/Ubuntu%2020.04%EC%97%90%EC%84%9C%20%EC%97%85%EB%8D%B0%EC%9D%B4%ED%8A%B8%20%ED%9B%84%20%EA%B8%B0%EB%B3%B8%20SSH%20ID%20%ED%82%A4%20%ED%8C%8C%EC%9D%BC%EC%9D%B4%20%EC%82%AD%EC%A0%9C%EB%90%98%EC%97%88%EC%8A%B5%EB%8B%88%EB%8B%A4..png)
SSH를 사용하여 NUC에 액세스합니다. OS를 업데이트하기 전에는 문제 없이 로그인할 수 있었습니다. 업데이트 후 "권한 거부됨(공개 키)" 오류가 발생합니다. 내 컴퓨터에서 필요한 키 파일을 볼 수 있습니다. 업데이트 후 ID 파일 경로가 제거된 것으로 나타납니다. SSH를 통해 로그인할 때 사용되는 기본 ID 파일을 재설정하는 방법은 무엇입니까?
debug1: Trying private key: /Users/xxx/.ssh/id_ed25519
debug3: no such identity: /Users/xxx/.ssh/id_ed25519: No such file or directory
debug1: Trying private key: /Users/xxx/.ssh/id_xmss
debug3: no such identity: /Users/xxx/.ssh/id_xmss: No such file or directory
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
[email protected]: Permission denied (publickey).
답변1
확인해 보면 ls ~/.ssh/id_*
RSA/DSA 키가 아직 남아 있는 것 같습니다. 예를 들어 내 시스템에서는 다음과 같습니다.
.ssh/id_ed25519 .ssh/id_ed25519.pub .ssh/id_rsa .ssh/id_rsa.pub
경우에 따라 이전 DSA/RSA 키가 기본적으로 키 교환에서 생략될 수 있습니다.
새로운 ed25519 키를 쉽게 생성하고 설치할 수 있습니다.
ssh-keygen -t ed25519
ssh-copy-id {remote_host}
또는 이전 키에 대한 참조를 허용할 수 있습니다(이 예와 같이 명령줄에서 또는 의 관련 섹션에 추가 ~/.ssh/config
).
ssh -o PubkeyAcceptedKeyTypes=+ssh-rsa {remote_host}