檢視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
[email protected]'s password:
Permission denied, please try again.
[10:22:48 talen@BJB0300 ~ ]$ ssh -l talen 192.168.74.129
[email protected]'s password:
[talen@localhost ~]$ ls
Desktop Documents Downloads Music Pictures Public Templates Videos
root使用者無法登入,普通使用者可以登入