谷歌SSH连接

root权限

sudo -i

修改配置文件

vi /etc/ssh/sshd_config

修改位置

PermitRootLogin yes
PasswordAuthentication yes
如下图位置

设置ROOT密码

passwd root

重启SSH服务

执行此句就可以了systemctl restart sshd

其他sshd服务命令的说明

查看sshd服务的状态
执行命令systemctl status sshd

开启sshd服务
执行命令systemctl start sshd

停止sshd服务
执行命令systemctl stop sshd

重启sshd服务
执行命令systemctl restart sshd

sshd服务开机启动
执行命令systemctl enable sshd

sshd服务禁止开机启动:
执行命令systemctl disable sshd

锁定sshd服务
执行命令systemctl mask sshd

解锁sshd服务
执行命令systemctl unmask sshd

重新加载sshd服务的配置文件
执行命令systemctl reload sshd

客户端连接

选择密码模式

注意事项

不同的linux系统有不同的设置方法大致都差不多,本文只限于CentOS8操作系统

最后修改:2020 年 08 月 14 日 11 : 43 PM
赞赏必须赞赏,多多益善,老板一直发大财!