SELINUX导致的SSH密匙无法创建和访问的问题
生活随笔
收集整理的這篇文章主要介紹了
SELINUX导致的SSH密匙无法创建和访问的问题
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
故障現(xiàn)象:
執(zhí)行生成密匙命令時提示: #ssh-keygen -t dsa ...... open /root/.ssh/id_dsa failed: Permission denied. Saving the key failed: /root/.ssh/id_dsa.
同時: 放置好其他機(jī)器的authorized_keys,也無法通過密匙訪問,任然需要密碼。 Connection to 192.168.X.X closed. [root@hadoop-0 .ssh]# ssh 192.168.X.X root@192.168.110.109's password:
原來的/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=enforcing # SELINUXTYPE= can take one of these two values: # ? ? targeted - Targeted processes are protected, # ? ? mls - Multi Level Security protection. SELINUXTYPE=targeted
故障解決方法: 修改 # 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 # SELINUXTYPE= can take one of these two values: # ? ? targeted - Targeted processes are protected, # ? ? mls - Multi Level Security protection. SELINUXTYPE=targeted
重啟服務(wù)器 能通過密匙訪問了 [root@XX-0 .ssh]# ssh 192.168.x.x Last login: Thu Apr 19 01:52:15 2012 from 192.168.x.x ------------------------------------------------------ 生成密匙 # ssh-keygen -t dsa Your public key has been saved in /root/.ssh/id_dsa.pub. The key fingerprint is: 96:22:e3:a9:ac:a0:45:24:19:c2:c2:1a:75:d9:61:f9 root@XX-test The key's randomart image is: --[ DSA 1024]---- |=.. .ooo ? ? ? ? | | = ...o ? ? ? ? ?| Y 能正常生成密匙,至此故障解決。
同時: 放置好其他機(jī)器的authorized_keys,也無法通過密匙訪問,任然需要密碼。 Connection to 192.168.X.X closed. [root@hadoop-0 .ssh]# ssh 192.168.X.X root@192.168.110.109's password:
原來的/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=enforcing # SELINUXTYPE= can take one of these two values: # ? ? targeted - Targeted processes are protected, # ? ? mls - Multi Level Security protection. SELINUXTYPE=targeted
故障解決方法: 修改 # 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 # SELINUXTYPE= can take one of these two values: # ? ? targeted - Targeted processes are protected, # ? ? mls - Multi Level Security protection. SELINUXTYPE=targeted
重啟服務(wù)器 能通過密匙訪問了 [root@XX-0 .ssh]# ssh 192.168.x.x Last login: Thu Apr 19 01:52:15 2012 from 192.168.x.x ------------------------------------------------------ 生成密匙 # ssh-keygen -t dsa Your public key has been saved in /root/.ssh/id_dsa.pub. The key fingerprint is: 96:22:e3:a9:ac:a0:45:24:19:c2:c2:1a:75:d9:61:f9 root@XX-test The key's randomart image is: --[ DSA 1024]---- |=.. .ooo ? ? ? ? | | = ...o ? ? ? ? ?| Y 能正常生成密匙,至此故障解決。
總結(jié)
以上是生活随笔為你收集整理的SELINUX导致的SSH密匙无法创建和访问的问题的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Nagios 请检查HTTP服务器关于该
- 下一篇: 用UDEV服务解决RAC ASM存储设备