ssh无法远程连接linux


当前第2页 返回上一页

因为SELinux的开启与关闭和两个重要的配置文件有关,分别是/etc/selinux/config和/boot/grub/menu.lst,所以要关闭SELinux就需要修改这两个文件,方法如下所示:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

[root@fanycb ~]# cat /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

SELINUX=disabled                       <====将=号后改为disabled

# SELINUXTYPE= can take one of these two values:

#     targeted - Targeted processes are protected,

#     mls - Multi Level Security protection.

SELINUXTYPE=targeted

[root@fanycb ~]# cat /boot/grub/menu.lst

# grub.conf generated by anaconda

#

# Note that you do not have to rerun grub after making changes to this file

# NOTICE:  You have a /boot partition.  This means that

#          all kernel and initrd paths are relative to /boot/, eg.

#          root (hd0,0)

#          kernel /vmlinuz-version ro root=/dev/sda5

#          initrd /initrd-[generic-]version.img

#boot=/dev/sda

default=0

timeout=5

splashimage=(hd0,0)/grub/splash.xpm.gz

hiddenmenu

title CentOS (2.6.32-279.el6.x86_64)

 root (hd0,0)

 kernel /vmlinuz-2.6.32-279.el6.x86_64 ro root=UUID=edc1b124-6bc5-4dbe-b2d4-88805da96d4d rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_MD crashkernel=128M.UTF-8 rd_NO_LVM rd_NO_DM rhg

b quiet selinux=0                     <====seliux=0 是添加上去的

 initrd /initramfs-2.6.32-279.el6.x86_64.img

[root@fanycb ~]#

完成!

相关文章教程推荐:linux教程

以上就是ssh无法远程连接linux的详细内容,更多文章请关注木庄网络博客

返回前面的内容

相关阅读 >>

linux 怎么打开文件

linux怎么安装run文件

linux怎么查看cpu核数?

linux怎么查看mysql安装在哪里

linux .和..的区别

如何根据指定的实例启动模板创建一个版本

linux如何查看是否安装oracle

linux中的php的配置文件在哪

适用于刚接触云计算的自行搭建网站流程

创建的自动快照策略怎么可以应用到任一磁盘

更多相关阅读请进入《SSH》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...