파일을 찾을 수 없기 때문에 ssh에서 비밀번호를 묻습니다.

파일을 찾을 수 없기 때문에 ssh에서 비밀번호를 묻습니다.

나는 SSH 키를 만지작거렸고 이제 작동시키려고 노력하고 있습니다. 이름이 지정된 서버에 연결하는 데 사용되는 .pub 및 SSH 파일을 전송했습니다 saleslist.

이제 그곳으로 옮겼으니 ~/.ssh/바와 일반 바가 모두 거기에 있습니다.

그러나 등록된 배포 계정에서도 SSH를 통해 서버에 연결하려고 하면 비밀번호를 묻는 메시지가 나타납니다 --disabled-password.

나는 이것을 실행했고 ssh -v sebastian@ip다음과 같이 반환되었습니다.

debug1: Found key in /Users/Sebastian/.ssh/known_hosts:43
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/Sebastian/.ssh/github_rsa
debug1: Authentications that can continue: publickey,password
debug1: Offering RSA public key: /Users/Sebastian/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /Users/Sebastian/.ssh/id_dsa
debug1: Trying private key: /Users/Sebastian/.ssh/id_ecdsa
debug1: Trying private key: /Users/Sebastian/.ssh/id_ed25519
debug1: Next authentication method: password

이 문제를 어떻게 해결할 수 있는지 아는 사람 있나요?

답변1

공개 키가 업로드되어 원격 호스트에서 사용 가능한지 확인하세요 ~/.ssh/authorized_keys.

~/.ssh또한 디렉터리의 권한이 700(drwx-----) 및 600(-rw-----)인지 확인하세요 ~/.ssh/authorized_keys.

관련 정보