安裝
打開"終端窗口",輸入"sudo apt-get install openssh-server"-->回車-->輸入"y"-->回車-->安裝完成比藻。
查看ssh服務(wù)是否啟動(dòng)
打開"終端窗口",輸入"sudo ps -e |grep ssh"-->回車-->有sshd,說明ssh服務(wù)已經(jīng)啟動(dòng)肤频,如果沒有啟動(dòng),輸入"sudo service ssh start"-->回車-->ssh服務(wù)就會(huì)啟動(dòng)。
修改 vim /etc/ssh/sshd_config
找到# Authentication:
LoginGraceTime 120
PermitRootLogin without passwd
StrictModes yes
改成
# Authentication:
LoginGraceTime 120
PermitRootLogin yes
StrictModes yes
重啟虛擬機(jī)
備用方案
把配置文件中的"PermitRootLogin without-password"加一個(gè)"#"號(hào),把它注釋掉-->再增加一句"PermitRootLogin yes"-->保存梗顺,修改成功。