首页 > 系统相关 >ubuntu 配置远程ssh

ubuntu 配置远程ssh

时间:2022-12-28 10:33:26浏览次数:44  
标签:sshd sudo PermitRootLogin ssh ubuntu 远程

需求:安装的新的ubuntu系统并不能远程使用ssh功能,需要做一些简单的设置。

1.安装 openssh-server 

sudo apt-get install openssh-server

2.修改配置文件 

将 /etc/ssh/sshd_config 文件 PermitRootLogin 这个字段 注释打开 并且设置 yes 

PermitRootLogin yes

3.重启ssh 服务 

sudo systemctl enable sshd

4.设置开机自启

sudo systemctl enable sshd

 

标签:sshd,sudo,PermitRootLogin,ssh,ubuntu,远程
From: https://www.cnblogs.com/wanghuixi/p/17009563.html

相关文章