SSH remote connection to Ubuntu encountered problems

Source: Internet
Author: User

1) After installing Ubuntu, enter the following command to get root privileges:

sudo passwd

2) changes to Ubuntu under Source:

sudo gedit/etc/apt/sources.list

Find a source that is also used to replace the original content in/etc/apt/sources.list

To perform an update:

sudo apt-get update

3) Install SSH for remote login

Ssh-client: Native server as client via SSH link remote

Ssh-server: As a remote server, this machine can be linked by a client

sudo apt-get install ssh-client

Note The above command may have the problem "dependent: openssh-client (= 1:6.6p1-2ubuntu1)"

Use this command to resolve: sudo apt-get install ssh-client= 1:6.6p1-2ubuntu1

Next install sudo apt-get install Ssh-server

4) Check that the SSH service is started

Ps-e |grep SSH

Showing sshd indicates successful installation

5) Update vim

sudo apt-get remove vim

sudo apt-get install vim

5) Modify the/etc/ssh/sshd_config file so that the remote connection is allowed by the machine

# Authentication:
Logingracetime 120
Permitrootlogin Yes
Strictmodes Yes

  

SSH remote connection to Ubuntu encountered problems

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.