Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1781646
  • 博文数量: 276
  • 博客积分: 1574
  • 博客等级: 上尉
  • 技术积分: 2894
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-26 23:23
个人简介

生活的美妙在于,不知道一下秒是惊艳还是伤神,时光流转,珍惜现在的拥有的时光

文章分类

全部博文(276)

文章存档

2017年(17)

2016年(131)

2015年(63)

2013年(2)

2012年(32)

2011年(31)

分类: LINUX

2012-06-26 10:23:56

查看ssh服务是否安装 

[root@localhost ~]# rpm -qa |grep -E '(ssh.*server|server.*ssh)'
openssh-server-5.3p1-70.el6.i686

查看配置文件
[root@localhost ~]# rpm -qc openssh-server
/etc/pam.d/ssh-keycat
/etc/pam.d/sshd
/etc/ssh/sshd_config
/etc/sysconfig/sshd
man手册查看禁止root登录的选项
[root@localhost ~]# man /etc/ssh/sshd_config
[root@localhost ~]# vim /etc/ssh/sshd_config
PermitRootLogin no

验证
[10:22:20 talen@BJB0300 ~ ]$ ssh -l root 192.168.74.129
root@192.168.74.129's password: 
Permission denied, please try again.
root@192.168.74.129's password: 

[10:22:48 talen@BJB0300 ~ ]$ ssh -l talen 192.168.74.129
talen@192.168.74.129's password: 
[talen@localhost ~]$ ls
Desktop  Documents  Downloads  Music  Pictures  Public  Templates  Videos

root用户无法登录,普通用户可以登录
阅读(16048) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~