SSH to connect the Ubuntu 12.0.4 in the virtual machine

Source: Internet
Author: User
Tags free ssh pscp telnet program

Summary: Mainly to solve the problem that can not use SSH remote Ubuntu, the use of Remote Tools is putty, can also use Xshell, ubunut12.0.4 is installed in the virtual machine, but this should have no impact.

One: The problem arises

Two days ago using VMware installed a ubuntu12.0.4, because often use the command line, but also like in the virtual machine and the physical machine cut to cut, feel very inconvenient, want to remote Ubuntu in XP, encountered a little accident, after a debugging to solve the success, the process record, A good memory is inferior to a bad pen.

At the beginning of the connection, always connected is not successful, think about the specific aspects of the problem, follow the idea step by step to verify.

Second: The specific solution process

1. Network

Since the remote Ubuntu system, then the first two networks are not in a network segment, can ping the pass?

A) on Windows PC--cmd Open Command window, type: ipconfig command, view host IP.

b) Ubuntu system, CTRL + ALT + F1 Open command terminal, type ifconfig command, view Ubuntu Internet IP.

c) Then in the Ubuntu system terminal type: Ping +windows Internet IP, check whether the ping pass, not check the network situation, and whether in a network segment, ping in the next step

d) In the Windows command window, type: Ping +ubuntu Internet IP, check whether the ping is on, not check the network, and whether it is in a network segment, ping in the next step

2. SSH Service

Since it is through the sshserver to remote, then when the network unblocked to solve is about the Ubuntu system ssh problem.

A) Check to see if the SSH service is installed

In the Ubuntu Terminal Command interface type:

SSH localhost

If the following prompt appears, it is not installed:

Ssh:connect to Hostlocalhost Port 22:connection refused

b) Installing the SSH service

If you see no sshserver installed through the previous steps, type the following command to install:

sudo apt-getinstall–y openssh-server

c) Start SSH after installation is complete

Service SSH Start

d) You can use the command after the boot is complete: ps–e | grep ssh to view the SSH status,

6455? 00:00:00 sshd

Indicates that the startup was successful.

Then use putty to connect Ubuntu, problem solving.



Environment:

Host Os:windows7 64bit

VMware version: 9.0.2 build-1031769

Ubuntu version: Ubuntu 12.10 64bit  

Preparatory work:

confirm that SSH is installed and activated in Ubuntu, Here's how:

sudo apt-get install Openssh-server

If you do not have SSH installed, then it will be installed, if the prompt has been installed, then proceed:

Ps-e |grep SSH
If only ssh-agent that Ssh-server has not started, need to/etc/init.d/ssh start, if you see the sshd that shows that Ssh-server has been started.

The method is simple:

1. It is best to restore the virtual machine network configuration by default, "edit", "Virtual Network Editor", "restore Default"

2. In the virtual machine settings, click "Network adapter", Network connection mode select "NAT", click "OK" to complete

3. Restart the virtual machine

4. Open terminal, enter Ifconfig to view the current virtual machine address (Eth0 's inet address )

5. Connect to port 22 of this address using putty


Putty is a free ssh/telnet program that connects to a platform that supports SSH telnet online and automatically obtains the other's system fingerprint (fingerprint). Once online, all communications are transmitted in an encrypted manner, so you no longer have to be afraid to be informed by others when using Telnet to transfer data to the Internet or your company's internal network!

This is a small Linux server Upload Tool, no installation, mainly for Web development (at least I often use this, the others have not tried). The entire folder can be uploaded by a single file, fast. You can also enumerate and view Linux server resources.

Putty is a free, Telnet, rlogin, and SSH client under the Windows 32 platform, but features no less than the business Telnet class tool. Using it to remotely manage Linux is very useful, and its main advantages are as follows:

It's very good to run under Windows 9x/nt/2000;
Full support for SSH1 and SSH2;

Software included in the putty:
Putty actually includes a total of 6 software groups. The most used is Putty.exe, PuTTY provided by the other software has PSCP, Psftp,puttytel,plink, Pageant,puttygen.


Putty:http://www.mycodes.net/130/681.htm



Reference website:


Http://www.linuxidc.com/Linux/2013-05/84819.htm


Http://www.linuxidc.com/Linux/2014-04/99728.htm



Using putty to upload files to a remote Linux method under Windows:

http://blog.csdn.net/god2469/article/details/9207487


Pscp

PSFTP:



SSH to connect the Ubuntu 12.0.4 in the 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.