Mobaxterm - 권한 거부됨(Publickey)

Mobaxterm - 권한 거부됨(Publickey)

mobaxterm을 통해 AWS의 Linux 인스턴스에 연결하는 데 몇 가지 문제가 있습니다. 서버에 SSH를 시도할 때 다음 오류가 발생합니다.


[2018-02-16 10:07.57]  ~
[bunde.DESKTOP-A0APQ1T] ➤ ssh -v -i "XYZ.pem" servername.eu-west-2.compute.amazonaws.com
OpenSSH_7.1p2, OpenSSL 1.0.1g 7 Apr 2014
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to servername.eu-west-2.compute.amazonaws.com [x.x.x.x] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /var/keys/.10996.ssh type -1
debug1: key_load_public: No such file or directory
debug1: identity file /var/keys/.10996.ssh-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4
debug1: match: OpenSSH_7.4 pat OpenSSH* compat 0x04000000
debug1: Authenticating to servername.eu-west-2.compute.amazonaws.com:22 as 'bunde'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-sha1 [email protected]
debug1: kex: client->server aes128-ctr hmac-sha1 [email protected]
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ssh-rsa SHA256: ...
debug1: Host 'servername.eu-west-2.compute.amazonaws.com' is known and matches the RSA host key.
debug1: Found key in /home/mobaxterm/.ssh/known_hosts:1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: pubkey_prepare: ssh_fetch_identitylist: agent refused operation
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /var/keys/.10996.ssh
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
**Permission denied (publickey).**

어떤 아이디어가 있나요? 나는 파일 권한을 갖고 놀아 보았지만(내 Mac에서는 키가 잘 잠겨 있어야 한다는 것을 알고 있습니다) 어떤 변경 사항도 내가 받는 오류에 영향을 미치지 않는 것 같습니다.

답변1

파일 권한에 문제가 있는 것 같습니다. ssh 명령을 실행하려는 폴더에 키가 있는지 mobaxterm을 통해 확인할 수 있습니까?

ls -lhMobaxterm 콘솔에서 실행 하고 XYZ.pem권한 600(-rw------) 외에도 mobaxterm을 실행하는 사용자의 소유자 및 그룹에 파일이 있는지 확인합니다.

저는 MAC 전문가는 아니지만 기본적으로 SSH 클라이언트가 있다고 확신합니다. 이것을 보세요.링크

답변2

Mobaxterm을 제거합니다. 더 이상 프로그램에 대한 쓰기 권한이 없으므로 프로그램 아래가 아닌 다른 곳에 다시 설치하세요.

관련 정보