Linux study Notes-connect to ubuntu12.0.4 in the VM via ssh

Source: Internet
Author: User
Linux Study Notes & mdash; ssh connection to ubuntu1204 in a virtual machine abstract: main Linux study Notes-connect to ubuntu12.0.4 in a virtual machine through ssh

Abstract: It mainly solves the problem that ssh remote ubuntu cannot be used. the remote tool is putty, xshell and javasut12.0.4 can also be used, but this should have no effect.

I. problems

Two days ago, I installed ubuntu with VMware. because I often use command lines and switch between virtual machines and physical machines, it was inconvenient. I wanted to remotely run ubuntu in xp. a little unexpected. after a while, the solution was successfully debugged and the process was recorded.

When the connection starts, the connection is always unsuccessful, and the specific problem is fixed. follow the steps to verify the problem step by step.

II. specific solution process 1. Network

Since we want to remotely run the ubuntu system, is it possible to ping the two networks in one CIDR block first?

A) on a Windows computer, run cmd to open the command window, enter the ipconfig command, and view the host IP address.

B) in ubuntu, press ctrl + alt + F1 to open the command terminal, enter the ifconfig command, and view the IP address of ubuntu.

C) then, on the ubuntu system terminal, type: ping + Windows Internet IP address, check whether ping is enabled, if not, check the network conditions, and whether the ping is performed in the same CIDR block or in the next step.

D) in the Windows command window, type ping + ubuntu IP address, check whether the IP address is pinged, check the network condition if the IP address is not pingable, and check whether the IP address is in the same CIDR block or ping.

2. ssh service

Since sshserver is used for remote connection, what needs to be solved when the network is smooth is the ssh problem of the ubuntu system.

A) check whether the ssh service is installed.

On the ubuntu terminal command interface, type:

                           ssh localhost

If the following prompt is displayed, it indicates that the installation has not been completed:

                            ssh: connect to hostlocalhost port 22: Connection refused

B) install the ssh service

If the sshserver is not installed through the above steps, enter the following command to install it:

                        sudo apt-getinstall –y openssh-server

C. start ssh after installation.

                 service ssh start

D) after the startup is complete, run the command ps-e | grep ssh to check the ssh status,

                        6455 ?        00:00:00 sshd

It indicates that the startup is successful.

Use putty to connect to ubuntu and solve the problem.

MORE: Linux study Notes-start
Related Article

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.