

Debian 设置 root 用户 SSH 登录
source link: https://devops.chat/11318.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Debian 设置 root 用户 SSH 登录
- 19小时前
- 0
- 19
Debian 系统安装完毕后,默认的配置是禁止 root 使用 ssh 登录。只能使用普通用户 ssh 登录到 Debian 后使用 su 切换到 root 用户。反复每次都要这样操作时间久了就是不爽,可以直接使用 root 账户 ssh 登录吗?肯定是可以的,通过修改 ssh 配置文件允许使用 root 账户使用 ssh 登录。
先用普通用户登录到 Debian 然后 su 切换到 root 账户,编辑 /etc/ssh/sshd_config 配置文件;将配置文件中的 PermitRootLogin、PermitEmptyPasswords 这两项修改为 yes 并去掉前面的注释符,下图中是我已经修改好的,可以参照。修改完毕保存后需要重启 ssh 服务。
su root # 切换到 root 账户;
vim /etc/ssh/sshd_config # 编辑 SSH 的配置文件;
PermitRootLogin yes # 去掉 PermitRootLogin 前面的注释符,修改为yes;
PermitEmptyPasswords yes # 去掉 PermitEmptyPasswords 前面的注释符,修改为yes;
systemctl restart ssh # 重启 SSH 服务;
点点赞赏,手留余香
Recommend
-
7
freeBSD9.2 安装 && 允许root用户用SSH登录 2013-11-21 16:15:00 http://forums.freebsd.org/showthread.php?t=36579 Issue...
-
10
V2EX › Python ssh 可以设置常用地登录吗? chenqh · 1 天前 · 1399 次点击
-
16
极路由ROOT local-ssh利用工具 local token: uuid: 请输入local_token、uuid http://192.168.199.1/local-ssh/ 获取local_token http://192.168.199.1/cgi-bin/turbo/proxy/router_info 获取uuid
-
5
ubuntu18.04 开启root登录SSH 2021年7月20日 0条评论 70次阅读 0人点赞...
-
4
为什么要获取root?因为我要修正黑群晖获取CPU型号不正确。虽然使用没什么毛病,但是看着不爽。如果你也有同样的需求可以跟着步骤来先获取群晖 DSM v6.2 的root权限然后再去修正CPU型号不正确的问题。 开始前你需要准备Putty或者xshell终端连接工具;
-
7
openwrt 给普通用户设置 ssh 私钥访问 2022-03-13 技术 暂无评论 3...
-
5
SSH无密码登录及putty设置 2018-04-04 发布在
-
13
ssh 如何在Debian 9配置SSH密钥免密码登录 SSH支持各种身份验证机制。最常见的两种是基于密码和基于公钥的身份验证。公钥的身份验证是基于数字的签...
-
4
(Debian/Ubuntu)mysql8.x 设置或更改root密码 2022-10-25 MySql ...
-
7
本文将指导如何在 Debian 12 和 Ubuntu 22.04 开启 SSH 的 RSA Key 登录。自从 OpenSSH 8.3 开始,RSA Key 登录默认被禁用,并被认为
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK