Putty remote logon to vmwarevm Linux (Ubuntu)

Source: Internet
Author: User
By default, the SSH service is not installed on Ubuntu. If you connect to ubuntu through ssh, You need to manually Install ssh-server. To determine whether to install the ssh service, run the following command: www.linuxidc.com @ linuxidc :~ $ Sshlocalhostssh: connectto & nbs

Install the SSH service

By default, the ssh service is not installed in Ubuntu. If you connect to ubuntu through ssh, You need to manually Install ssh-server. To determine whether to install the ssh service, run the following command:

  1. Www.linuxidc.com @ linuxidc :~ $ Ssh localhost
  2. Ssh: connect to host localhost port 22: Connection refused

As shown above, it indicates that no installation is available. You can use apt to install it. The command is as follows:

  1. Www.linuxidc.com @ linuxidc :~ $ Sudo apt-get install openssh-server

The system will automatically install the service. After the installation is complete, start the service:

  1. Www.linuxidc.com @ linuxidc :~ $ Sudo/etc/init. d/ssh start

After the service is started, run the following command to check whether the service is correctly started:

  1. Www.linuxidc.com @ linuxidc :~ $ Ps-e | grep ssh
  2. 6212? 00:00:00 sshd

The preceding command indicates that OK is enabled. Note: The default ssh port is 22. You can change the port and stop it first,
Then start. Modify the configuration in/etc/ssh/sshd_config, as shown below.

  1. Www.linuxidc.com @ linuxidc :~ $ Vi/etc/ssh/sshd_config
  2. # Package generated configuration file
  3. # See the sshd (8) manpage for details
  4. # What ports, IPs and protocols we listen
  5. Port 22

Finally, it is time to connect. See the following command:

  1. Www.linuxidc.com @ linuxidc :~ $ Ssh exceljava@192.168.158.129.
Disconnect:
  1. Exit

Use Putty to log on to the VM

First, you must ensure that the virtual machine and the host can be pinged to each other. You can search for articles about virtual machine IP configuration on the Internet.

Next, open the Putty client, and enter relevant parameters in the following interface:


The IP address is the Ubuntu IP address in the VM.
Click Open to enter Putty, and enter the user name and password to log in.


Solve Chinese garbled characters

After logging in, run the ls command to view the root directory of the current user. garbled characters are displayed.

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.