Ubuntu 安装ssh服务以及开启root用户ssh登录

一、安装ssh服务

安装ssh服务

sudo apt-get update
sudo apt-get install openssh-server

安装完成后启动ssh服务

sudo service ssh start

二、开启root用户ssh登录

修改配置文件: /etc/ssh/sshd_config

找到

# Authentication:  
LoginGraceTime 120  
PermitRootLogin prohibit-password  
StrictModes yes

更改为

# Authentication:  
LoginGraceTime 120  
#PermitRootLogin prohibit-password  
PermitRootLogin yes  
StrictModes yes

重启ssh服务

sudo service ssh restart

三、参考资料

Ubuntu 16.04使用root 帐号开启 SSH 登录

你可能感兴趣的:(Linux开发环境配,linux,ssh)