Debian11无法使用root登入以及ssh登入

简介: 记Debian11无法使用root登入以及ssh登入

安装openssh

安装openssh:sudo apt install openssh-server
重启ssh服务:sudo /etc/init.d/ssh restart 或 systemctl start ssh.service
#切换root用户
su - root
vim /etc/gdm3/daemon.conf

图片.png

#注释auth   required        pam_succeed_if.so user != root quiet_success
vim /etc/pam.d/gdm-password

图片.png

#编辑ssh配置文件。
vim  /etc/ssh/sshd_config
#添加如下
PermitRootLogin yes

图片.png

#就可以使用MobaXterm,root正常登入使用
目录
相关文章
|
安全 Linux 网络安全
上手Linux:禁用 root 用户,修改22端口,使用 ssh 登录
本文介绍了在 linux 系统中,如何禁用 root 用户登录,修改默认的 22 端口号,以及设置只能使用 SSH 秘钥登录的方式,从而在一定程度上提高了系统的安全性。
977 0
|
网络安全
kali 启用默认root,开启SSH服务,安装VNC,设置服务自启动
启用默认root,开启SSH服务,设置服务自启动,安装VNC
|
Ubuntu Linux 网络安全
Linux Debian11服务器安装SSH,创建新用户并允许远程SSH远程登录,并禁止root用户远程SSH登录
本文介绍了Linux Debian11服务器安装SSH,创建新用户并允许远程SSH远程登录,并禁止root用户远程SSH登录。
2301 1
Linux Debian11服务器安装SSH,创建新用户并允许远程SSH远程登录,并禁止root用户远程SSH登录
|
3天前
|
网络安全 数据安全/隐私保护
银河麒麟v10系统SSH远程管理及切换root用户的操作方法
银河麒麟v10系统SSH远程管理及切换root用户的操作方法
|
9月前
|
Ubuntu Linux 网络安全
Ubuntu18.04.6 配置固定ip、ssh登录、root账号
Ubuntu18.04.6 配置固定ip、ssh登录、root账号
173 0
|
11月前
|
安全 Ubuntu Java
服务器搭建(1)——从购买云服务器到修改SSH端口、禁用ROOT远程登录
服务器搭建(1)——从购买云服务器到修改SSH端口、禁用ROOT远程登录
229 0
|
分布式计算 Hadoop Linux
Linux配置SSH免密码登录(非root账号)
设置多台linux服务器之间以非root账号的身份免密码ssh登录
643 0
Linux配置SSH免密码登录(非root账号)
|
Linux Shell 网络安全
【Linux】——在Xshell输入ssh root@公网ip进行远程连接Linux失败,显示(port 22): Connection failed的完美解决方法
【Linux】——在Xshell输入ssh root@公网ip进行远程连接Linux失败,显示(port 22): Connection failed的完美解决方法
631 0
|
网络安全
无法启动ssh:/run/sshd must be owned by root and not group or world-writable.
无法启动ssh:/run/sshd must be owned by root and not group or world-writable.
272 0
无法启动ssh:/run/sshd must be owned by root and not group or world-writable.
|
弹性计算 监控 Ubuntu
Ubuntu的SSH安全配置,查看SSH登录日志文件,修改默认端口,UFW配置防火墙,禁止root用户登录,禁用密码登陆,使用RSA私钥登录,使用 Fail2ban 工具,使用两步验证(2FA)
Ubuntu的SSH安全配置,查看SSH登录日志文件,修改默认端口,UFW配置防火墙,禁止root用户登录,禁用密码登陆,使用RSA私钥登录,使用 Fail2ban 工具,使用两步验证(2FA)
1825 0