1. 程式人生 > >Ubuntu 安裝ssh服務以及開啟root使用者ssh登入

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 登入