使用Xshell 5工具連接Ubuntu18服務器


1.安裝SSH

打開終端窗口,輸入命令

sudo apt-get install openssh-server

 等待安裝完成

2.查看SSH服務是否啟動

輸入命令

sudo ps -e |grep ssh  

 看到SSHD則說明服務已經啟動,如下圖

如果沒有啟動,輸入命令

sudo service ssh start

3.修改配置文件

輸入命令

sudo gedit /etc/ssh/sshd_config

把配置文件中的"PermitRootLogin without-password"加一個"#"號注釋掉,再增加一句"PermitRootLogin yes",保存文件,如下圖。這樣做是為了允許root用戶登錄。

或者直接把下面的內容復制到配置文件中

------------------------------內 容------------------------------
# Authentication:
LoginGraceTime 120
#PermitRootLogin without-password
PermitRootLogin yes
StrictModes yes
------------------------------內 容------------------------------

4.重新啟動

/etc/init.d/ssh restart

5.查看ip地址  

ifconfig

6.安裝Xshell 5

7.連接

root用戶

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM