ssh 秘钥报错

回复 收藏
[root@localhost ssh]# ssh root@192.168.40.251
root@192.168.40.251's password:
Permission denied, please try again.
root@192.168.40.251's password:
Permission denied, please try again.
root@192.168.40.251's password:
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
2015-03-11 09:59 举报
已邀请:
0

tangenxin

赞同来自:

问题已解决。 是因为没有关闭 selinux  

虽然常识,但有时还是我忘记了。 花了好长时间才找到问题。郁闷

]#setenforce 0
test.txt                                                                                               100%   39     0.0KB/s   00:00   
[root@localhost ~]# vi /etc/selinux/config

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled                     //改成disabled
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted
0

RHEL5.6.7

赞同来自:

SELINUX=permissive这个比较好吧,不启用,但警告。
0

qiangbohp

赞同来自:

但是在练习的时候还是彻底关闭的好。
0

gjc159357

赞同来自:

1
0

定海偶然

赞同来自:

改完之后,#setenforce 0

回复帖子,请先登录注册

退出全屏模式 全屏模式 回复
评分
可选评分理由: