root账户用ssh-keygen创建公私钥失败怎么回事?
centos吧
全部回复
仅看楼主
level 1
root账户用ssh-keygen创建公私钥失败怎么回事???
[root@Home]# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
open /root/.ssh/id_rsa failed: Permission denied.
Saving the key failed: /root/.ssh/id_rsa.
求大神帮忙解惑!
2013年04月15日 09点04分 1
level 1
root# ll /root/.ssh/id_rsa 啥结果?
2013年04月16日 02点04分 2
-rw-rw-r--. 1 dwrap dwrap 232 Jul 9 16:16 id_rsa我遇到 的问题和他的一样,麻烦指点下
2013年07月09日 08点07分
回复 gentleman_小司 :是不是selinux的问题,建议更新下selinux相关的包或者设为permissive模式试试。
2013年07月09日 18点07分
回复 丹凤笑笑生 :后面的确是修改 selinux [大拇指]解决
2013年07月12日 03点07分
@拣贝壳的小孩 能说一下怎么解决的吗
2017年02月27日 08点02分
level 9
同觉得是权限问题,检查目录权限,selinux。建议排查后参考教程再来http://www.linuxprobe.com/examination.html
2017年02月27日 13点02分 3
@挥泪樱花下 刚才回复你了。 位置不对。
2017年04月13日 15点04分
居然挖坟...
2017年05月10日 01点05分
level 1
1、ssh-keygen做密码验证可以使在向对方机器上ssh ,scp不用使用密码.具体方法如下:
2、两个节点都执行操作:#ssh-keygen -t rsa
然后全部回车,采用默认值
3、这样生成了一对密钥,存放在用户目录的~/.ssh下。
将公钥考到对方机器的用户目录下 ,并将其复制到~/.ssh/authorized_keys中(操作命令:#cat id_dsa.pub >> ~/.ssh/authorized_keys )
4、设置文件和目录权限:
设置authorized_keys权限
$ chmod 600 authorized_keys
设置.ssh目录权限
$ chmod 700 -R .ssh 是在linux就该这么学里边学的,也可以看一下w w w . linuxprobe . com
2017年02月27日 13点02分 4
1