昨天我仍然可以 ssh 进入我的 aws ec2-instance,但今天得到 用命令 原因是我似乎改变了 /home/ubuntu 目录的 chmod,也就是。 EBS 卷(根设备)上的 /home/ubuntu/.ssh,使 ssh 不再有效。 现在我无法通过 ssh 进入实例 我怎 ...
提示:本站收集StackOverFlow近2千万问答,支持中英文搜索,鼠标放在语句上弹窗显示对应的参考中文或英文, 本站还提供 中文繁体 英文版本 中英对照 版本,有任何建议请联系yoyou2525@163.com。
我遵循了Jeffrey Way的说明,并且我在终端内不断得到相同的SSH错误。
我想通过Sequel Pro连接并进一步深入研究,这是最准确的日志描述:
debug1: Host 'IP ADDRESS' is known and matches the RSA host key.
debug1: Found key in /Users/ben/.ssh/known_hosts:17
debug1: ssh_rsa_verify: signature correct
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
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/ben/.ssh/id_rsa
debug1: Authentications that can continue: publickey
debug1: Offering RSA public key: /Users/ben/.ssh/id_rsa.pub
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
Permission denied (publickey).
我这样生成SSH密钥:
ssh-keygen -t rsa -C "your_email@example.com"
然后通过以下方式将其复制到Laravel Forge:
cat ~/.ssh/id_rsa.pub | pbcopy
它保存没有错误。 但后来我尝试伪造@ ip_address并且它总是返回Permission denied错误。
任何帮助将非常感激。
以下说明我遇到了同样的问题。
尝试:
pbcopy < ~/.ssh/id_rsa.pub
我通过在Forge上重新创建服务器来解决这个问题。 pbcopy
也没能奏效。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.