Fix Ubuntu can't connect remotely

Source: Internet
Author: User

When the Ubantu is loaded, there may be a small partner that ignores a bit and forgets to play a space in one place, resulting in the inability to connect remotely.

If you can make a tick here, you can not use the following operation.

To switch to the root account first

sudo passwd root switch to root

However, you must first enter the password of the normal user, which is the current user's password.

Then enter the root password two times so that the root password is set.

Switch to root user

The SU root enters the password.

There is no connection to SSH because there is no response to the package Openssh-server so the package to install this response

Configure the SSH service to enter the configuration directory after the installation is complete

To configure the configuration file, first comment out Permitrootlogin Prohibit-password (comment on line 28th)

Add Permitrootlogin Yes at the bottom of this line (added on line 29th)

Modify the previous configuration file

After modification

Restart the SSH service

View IP Address

Connect with Xshell

Fix Ubuntu can't connect remotely

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.