Window uses SSH to connect to Ubuntu in a native virtual machine

Source: Internet
Author: User
Tags ssh secure shell

@window using SSH to connect to Ubuntu in a native virtual machine

Between the host and the virtual machine, the IP address of the 2 machines must be set to the same network segment.

1, set the virtual machine: Virtual machine –> settings –> hardware–> network Adapter, set to "Bridge: Connect directly to physical network", "NAT: Use shared host IP address" at the connection point.

2, Windows and virtual machine under Ubuntu IP address set to the same network segment
Ubuntu Configuration and modify IP address please see this blog related articles Ubuntu configuration and modify IP address

3. Ping each other to determine if Windows and Linux ping each other.
I, c:\users\jiqinlin>ping 192.168.11.88 #192.168.11.88 virtual machine under Ubuntu IP

Pinging 192.168.11.88 with 32 bytes of data:
Reply from 192.168.11.88: Byte =32 time <1ms ttl=64
Reply from 192.168.11.88: Byte =32 time <1ms ttl=64
Reply from 192.168.11.88: Byte =32 time <1ms ttl=64
Reply from 192.168.11.88: Byte =32 time <1ms ttl=64

Ping Statistics for 192.168.11.88:
Packet: Sent = 4, received = 4, lost = 0 (0% missing),
Estimated time to round trip (in milliseconds):
Shortest = 0ms, longest = 0ms, average = 0ms

II,[email protected]: ~# ping 192.168.11.74 #192.168.11.74 under Windows IP
PING 192.168.11.74 (192.168.11.74) bytes of data.
Bytes from 192.168.11.74:icmp_req=1 ttl=64 time=0.242 ms
Bytes from 192.168.11.74:icmp_req=2 ttl=64 time=0.268 ms
Bytes from 192.168.11.74:icmp_req=3 ttl=64 time=0.251 ms

A similar message appears that Windows is interoperable with Linux.

4, connect SSH, remember to install SSH Secure Shell Client clients under window before connecting

The procedure is as follows:
Connect to the virtual machine's Ubuntu under Win7 via SSH, the connection fails, the message is shown:

Then I entered under Ubuntu Terminal: SSH localhost, see:


Ssh:connect to host localhost Port 22:connection refused, originally did not install sshd, that is, Openssh-server.
Input command: sudo apt-get install Openssh-server
Then enter the command: SSH localhost, see

You can now connect the virtual machine's Ubuntu system via the SSH tool.

The blogger uses:

Direct Point Host

Set Ubuntu hostname, and the corresponding user, password, directly can connect 20150717

Window uses SSH to connect to Ubuntu in a native virtual machine

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.