开启ssh服务

CentOS默认安装好是开启的,如果关闭可安如下步骤开启:

[root@localhost ~]# vim /etc/ssh/sshd_config
#PasswordAuthentication yes
#PermitEmptyPasswords no
PasswordAuthentication yes
#将#PasswordAuthentication no的注释去掉,并且将NO修改为YES
PermitRootLogin yes
将#PermitRootLogin yes的注释去掉
[root@localhost ~]# /etc/init.d/sshd restart  //重新启动SSH服务
Stopping sshd:                                             [  OK  ]
Starting sshd:                                             [  OK  ]
[root@localhost ~]# /etc/init.d/sshd status  //验证SSH服务状态
openssh-daemon (pid  1963) is running...
[root@localhost ~]#




你可能感兴趣的:(linux,ssh)