Ubuntu问题 -- 允许ssh使用root用户登陆

目的

  • 新重装的系统, 普通用户可以使用ssh登陆服务器, 但是root不能使用ssh登陆

方法

vim 编辑ssh配置文件

bash 复制代码
sudo vim /etc/ssh/sshd_config

找到 PermitRootLogin 这一行, 把后面值改成 yes

重启ssh

bash 复制代码
sudo service sshd restart

然后使用root账号登陆即可

相关推荐
DFT计算杂谈1 分钟前
无 Root 权限在 Tesla K80 零门槛部署 DeepSeek 大模型
linux·服务器·网络·数据库·机器学习
Zhang~Ling1 小时前
从 fopen 到 struct file:从零开始拆解 Linux 文件 I/O
linux·运维·服务器
DeeplyMind1 小时前
Linux 深入 per-VMA lock:Linux 缺页路径如何摆脱 mmap_lock
linux·per-vma lock
爱写代码的森1 小时前
蒙三方库 | harmony-utils之FileUtil文件重命名与属性查询详解
linux·运维·服务器·华为·harmonyos·鸿蒙·huawei
XMAIPC_Robot2 小时前
软硬协同实时控制|RK3588业务调度+FPGA硬件时序,ethercat实现半导体设备微秒级响应(125us)
linux·arm开发·人工智能·fpga开发
重生的黑客3 小时前
Linux 进程优先级、切换与调度:从孤儿进程到 O(1) 调度模型
linux·运维·服务器·进程优先级·nice
骑上单车去旅行4 小时前
MD5校验对比脚本
linux·服务器·windows
平生幻4 小时前
Linux 常用命令
linux
ShirleyWang0126 小时前
让headlamp控制台能访问
linux·服务器·python·k8s·k3s
liuccn6 小时前
Linux 存储系统:LVM 与直接分区
linux·运维