Set the connection properties for VMware virtual machines first
1, bridge, the use of real network card settings and window with a network segment can be directly communicated
2, Hostnoly is through the VM8 (see all your network connection) can only contact with the host settings and VM8 the same network segment can be connected
3, net, is through Vmnet1 and virtual machine contact set up and vm1 the same network segment
Ifconfig eth0 192.168.41.2 Set the IP address of Linux
If the ping can be ping, if the ping is going to go through the next
Xshell Connection if unable to connect
The IP configuration was wrong, or the configuration did not restart the network connection, but since the ping should not be the problem, but for the sake of insurance, or a reboot, but after the restart is still not effective.
Firewall issues, turn off Windows Firewall, 360, and view the Ubuntu firewall via commands:
sudo UFW status
Found that the firewall is already inactive, still stop:
sudo ufw disable
But still invalid, Ubuntu firewall open port command:
sudo ufw allow 22
Has the Linux SSH service been started?
Suddenly think, Ubuntu seemingly default is not installed Ssh-server, will be installed by default ssh-client, suddenly dawned, is not because of this reason? So look at the discovery, sure enough not installed, the following installation Openssh-server
But to be connected via SSH, the Ubuntu system needs to be openssh-server and can be
Ps-e | grep ssh
To see if the sshd is not shown, it is not installed Openssh-server
Available through
sudo apt-get install Openssh-server
To install Openssh-server, if successful, the installation will succeed if it encounters
123456789101112 |
$ sudo apt-get install Openssh-server reading the package list ... Complete the reading status information ... Finish There are some packages that cannot be installed. If you are using the unstable release, this may be openssh-server: dependency: openssh-client (= 1:6.6P1-2UBUNTU1) e: cannot fix the error because you require certain packages to remain current, that is, they destroy the dependencies between packages. |
This is because, Openssh-server is dependent on Openssh-clien, that Ubuntu did not bring openssh-client? The original Openssh-clien is the same as the version that is dependent on the Openssh-server to be installed.
So to install the corresponding version of the Openssh-clien, to cover off the Ubuntu comes with
1234567891011121314151617181920 |
$
sudo
apt-get
install
openssh-client=1:6.6p1-2ubuntu1
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
建议安装的软件包:
libpam-
ssh
keychain monkeysphere
下列软件包将被【降级】:
openssh-client
升级了 0 个软件包,新安装了 0 个软件包,降级了 1 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
需要下载 566 kB 的软件包。
解压缩后会消耗掉 0 B 的额外空间。
您希望继续执行吗? [Y
/n
] y
获取:1 http:
//cn
.archive.ubuntu.com
/ubuntu/
trusty
/main
openssh-client amd64 1:6.6p1-2ubuntu1 [566 kB]
下载 566 kB,耗时 2秒 (212 kB
/s
)
dpkg:警告:downgrading openssh-client from 1:6.6p1-2ubuntu2 to 1:6.6p1-2ubuntu1
(正在读取数据库 ... 系统当前共安装有 200015 个文件和目录。)
Preparing to unpack ...
/openssh-client_1
%3a6.6p1-2ubuntu1_amd64.deb ...
Unpacking openssh-client (1:6.6p1-2ubuntu1) over (1:6.6p1-2ubuntu2) ...
Processing triggers
for
man
-db (2.6.7.1-1) ...
正在设置 openssh-client (1:6.6p1-2ubuntu1) ...
|
Can be seen, prompted the system openssh-client is degraded, so that the installation of Openssh-server can be successful!
And then install sudo apt-get install Openssh-server.
And then I tried to connect OK.
Window Xshell Connect to a local Ubuntu virtual machine