.ssh目录不被创建 [英] .ssh directory not being created

查看:1087
本文介绍了.ssh目录不被创建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

要生成 .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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆