操作環境:
Windows10 64位
Ubuntu14.04 32位
在vmvare里安裝好了Ubuntu(32/64都可以)
Xshell6 軟件
操作流程
-
在window10上安裝好Xshell;
-
Ubuntu安裝
openssh-server
。Xshell 和Ubuntu通過ssh遠程協議連接。sudo apt-get install openssh-server
正常出現下面的情況:
benjie@ubuntu:~$ sudoapt-get install openssh-server Reading package lists... Done Building dependencytree Reading state information... Done Some packages could not be installed. This may mean thatyou have requested an impossiblesituation or if you are using the unstable distribution that somerequired packages have not yet been created or been moved out of Incoming. The following informationmay help to resolve the situation: The following packageshave unmet dependencies: openssh-server : Depends: openssh-client (= 1:6.6p1-2ubuntu1) but 1:6.6p1-2ubuntu2.7 is to beinstalled Recommends: ncurses-term but it is not going to beinstalled Recommends: ssh-import-id but it is not going to beinstalled E: Unable to correct problems, youhave held broken packages.
那是因為openssh-server 依賴於openssh-client,Ubuntu不是自帶了openssh-client了嗎? 因為自帶的openssh-client的版本與openssh-client所依賴的不同,因此需
要執行下面的命令:sudo apt-get install openssh-client=1:6.6p1-2ubuntu1
再執行命令:
sudo apt-get install openssh-server
安裝完成后可以通過
ps -e|grep ssh
查看openssh-server是否安裝成功;
Xshell 建立連接
-
獲取Ubuntu的ip
-
新建連接;
-
在打開的窗口中填寫信息;
-
選擇“用戶身份驗證”,輸入Ubuntu的登錄賬戶與密碼;
-
SSH安全警告,選擇接受並保存;(忘記截圖了)
-
愉快的使用xshell 了