.ssh目录不被创建 [英] .ssh directory not being created
问题描述
要生成 .ssh
dir,请使用以下命令:
To generate the .ssh
dir I use this command:
ssh-keygen
取自本教程: http://ebiquity.mbc.edu/Tutorials/Hadoop/05%20-%20Setup%20SSHD.html
但是没有创建 .ssh
目录,所以当我使用 cd〜/ .ssh
我得到这个错误:
But the .ssh
directory is not created so when I use cd ~/.ssh
I get this error:
"no such file or directory"
是否缺少步骤?是否应该在使用 ssh-keygen
命令时创建 .ssh
dir?
Is there a step missing ? Should the .ssh
dir be created when I use the ssh-keygen
command?
要解决您的问题,您可以使用以下方法来解决问题:
推荐答案
您可以ssh到某个其他位置:
To fix your problem, you can either ssh to some other location:
ssh user@some.host
并接受新键 - 将创建目录〜/ .ssh
和 known_hosts
,或使用
and accept new key - it will create directory ~/.ssh
and known_hosts
underneath, or simply create it manually using
mkdir ~/.ssh
chmod 700 ~/.ssh
注意 chmod 700
是一个重要的步骤!
Note that chmod 700
is an important step!
之后,ssh-keygen应该没有投诉。
After that, ssh-keygen should work without complaints.
这篇关于.ssh目录不被创建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!