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