Open the root account for Ubuntu and SSH login

Source: Internet
Author: User


System environment: Ubuntu 14.04

Problem: Ordinary users using WINSCP to upload files locally to the system will report the following error:

Unauthorized access.

Error code: 3

Error message returned by the server: Permission denied

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/7F/B4/wKiom1cpov_CW3oVAABIyH8E5iM556.png "title=" Qq20160504152116.png "alt=" Wkiom1cpov_cw3ovaabiyh8e5im556.png "/>


This is because you want administrator privileges, and you do not want to give normal users administrator privileges. so the root account is only used to upload files. Ubuntu does not open the root account by default, and we encourage the best not to use the root account of the direct operating system, the following steps to open the root account:


1. First set the root password

[Email protected]:~$ sudo passwd root

[sudo] password for Luban://Enter password for current normal user

Enter new UNIX Password://Set password for root

Retype new UNIX Password://Confirm Input Password

Passwd:password updated successfully


2. Modify the/etc/ssh/sshd_config file

[Email protected]:~$ su-root

Password:

[Email protected]:~# vi/etc/ssh/sshd_config

# Authentication:

Logingracetime 120

# Permitrootlogin Without-password

Permitrootlogin Yes

Strictmodes Yes

Description: comment out "Permitrootlogin without-password" and add "permitrootlogin yes"


3. Restart the SSH service

[Email protected]:~# service SSH restart

SSH stop/waiting

SSH start/running, Process 1335

[Email protected]:~#


Once the operation is complete, you can log in to WINSCP via the root account.



This article is from the "M April Days" blog, please be sure to keep this source http://msiyuetian.blog.51cto.com/8637744/1770016

Open the root account for Ubuntu and SSH login

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.