需求:安装的新的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