1、安装 ssh server
apt install openssh-server
2、修改 /etc/ssh/sshd_config 文件
3、确保配置如下两项
PermitRootLogin yes
PasswordAutherntication yes
4、关闭如下配置(这个在centos ubuntu 上没有这个要求,麒麟操作系统有)
#UsePAM yes
5、保存
6、重启sshd 服务
systemctl restart sshd
本文介绍了如何在CentOS和Ubuntu系统上安装并配置SSH服务器,包括安装OpenSSH服务器,修改sshd_config文件,允许root登录及启用密码验证。特别提到了麒麟操作系统中的一项差异。
1、安装 ssh server
apt install openssh-server
2、修改 /etc/ssh/sshd_config 文件
3、确保配置如下两项
PermitRootLogin yes
PasswordAutherntication yes
4、关闭如下配置(这个在centos ubuntu 上没有这个要求,麒麟操作系统有)
#UsePAM yes
5、保存
6、重启sshd 服务
systemctl restart sshd
4167

被折叠的 条评论
为什么被折叠?