我公司的某个人做了一些混乱,并在该实例上玩了一些权限。 我想我设法恢复它们但是我不能通过SSH连接。 我看到所有文档 - 更改,因为他们建议我的.ssh文件夹的权限和联系它的文件。 但仍然没有成功。
这是调试中的内容:
debug1: Host '[ec2-35-158-36-123.eu-central-1.compute.amazonaws.com]:922' is known and matches the RSA host key.
debug1: Found key in /home/mobaxterm/.ssh/known_hosts:33
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: mobilePortalDev.pem (0x0), explicit
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic
debug3: start over, passed a different list publickey,gssapi-keyex,gssapi-with-mic
debug3: preferred hostbased,publickey,password,keyboard-interactive
debug3: authmethod_lookup publickey
debug3: remaining preferred: password,keyboard-interactive
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Trying private key: mobilePortalDev.pem
debug3: sign_and_send_pubkey: RSA SHA256:q1Dv2WPu+7ivOPemq0J1zaZdLyekni8URMGn1+zo7Aw
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
我只使用密钥验证。 我认为可能是锁定或不可写,所以它只是无法获得密钥。
驾驶室有人帮我吗?
答案 0 :(得分:0)
您是否尝试将公钥放在authorized_key文件中并为其提供完全权限
/home/username/.ssh/authorized_keys