Allow root user ssh remote login under Ubuntu

Source: Internet
Author: User
Tags openssh server ssh secure shell ssh server

Original: http://blog.sina.com.cn/s/blog_7e64a87b0100rn8w.html

SSH server, you can log on to the remote server via SSH protocol, but Ubuntu is enabled by default, but is logged on by public key.

Enable root User: sudo passwd root #修改密码后就启用了

Install OpenSSH server (it looks like Ubuntu is installed by default):

1. Install OpenSSH server using the APT command

$ sudo apt-get install Openssh-server

2. OpenSSH server can be configured

$ sudo vi/etc/ssh/sshd_config

Locate the Permitrootlogin line and change to Permitrootlogin Yes, which allows the root user to log in any authentication mode

OK, here we also learn about permitrootlogin this parameter, its value can be yes/no/without-password, meaning is as follows

permitrootlogin Yes                   #允许root用户以任何认证方式登录 (seemingly also two authentication methods: User name password authentication, public key authentication) Permitrootlogin without-password      #只允许root用public key authentication method login Permitrootlogin No                    #不允许root用户以任何认证方式登录

3. Restart OpenSSH server

$ sudo service ssh restart

4. If the client is Ubuntu, you have installed the SSH client, you can use the following command to connect to the remote server.

$ ssh <ip>

If it is a Windows system, you can connect remotely using SSH software such as SSH Secure shell.

Allow root user ssh remote login under Ubuntu

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.