This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
您的
homestead.yaml
文件指示您的SSH键文件位于其典型位置:〜/.ssh/id_rsa
。但是,调试输出表明SSH正在另一个位置查找密钥:它正在以
〜/.keys
而不是〜/.ssh
来查找。该位置不存在密钥,因此SSH找不到它,也不会将其呈现给远程系统。根据您的调试输出中的“用户命令”行,SSH正在使用非标准配置文件,
/applications/sequel ace.app/contents/resources/ssh_config
。此文件可能包含一些配置选项,这些配置选项会导致SSH在.keys
目录中查看密钥文件,而不是.ssh
Directory。简单的解决方案是将密钥文件(
id_rsa
和_id_rsa.pub
)从您的.ssh
目录中的目录复制到此。
目录。关键文件并不大,并且将它们放在一个以上的地方没有真正的问题。或者,您可以编辑此特殊的SSH配置文件,以使其在通常的位置寻找关键文件。有必要识别导致SSH查看其他目录并更改或删除的配置选项。看起来这个特殊的配置文件是您安装的一些软件的一部分?更改配置文件可能会影响软件的工作原理,或者它可以为您每次更新软件时为您重新编辑文件。
Your
Homestead.yaml
file indicates that your ssh key file is in its typical location:~/.ssh/id_rsa
. However, the debug output shows that ssh is looking in another location for the key:It's looking in
~/.keys
instead of~/.ssh
. The key isn't present in that location, so ssh doesn't find it and doesn't present it to the remote system.According to the "user command" line in your debug output, ssh is being run using a nonstandard config file,
/Applications/Sequel Ace.app/Contents/Resources/ssh_config
. It's likely that this file contains some configuration options which cause ssh to look in the.keys
directory for key files instead of the.ssh
directory.The simple solution would be to copy your key files (
id_rsa
and_id_rsa.pub
) from your.ssh
directory into this.keys
directory. The key files aren't large, and there's no real problem with having them in more than one place.Alternately, you could edit this special ssh config file to make it look for key files in the usual place. It would be necessary to identify the configuration options that are causing ssh to look in the other directory, and change or remove them. It looks like this special config file is part some software that you installed? Changing the config file might affect how the software works, or it could create extra work for you to re-edit the file every time the software is updated.
我个人在 2022 年末也遇到了同样的问题。解决方法是我必须使用 Homestead.yaml 文件中相同的 IP 作为主机地址(默认为
192.168.56.56
)。I personally had the same issue in late 2022. The fix was that I had to use same IP as in the Homestead.yaml file as the host address (which is
192.168.56.56
by default).