Enable Ubuntu root remote logon and Ubuntu root
I have encountered this problem for a long time, but today I want to solve it. That is to say, during Ubuntu installation, remote SSH Login is forbidden. Every time you have to use an ordinary user SSH to remotely log on, and then su switches to root, it is really difficult for me to tolerate obsessive-compulsive disorder, so I found the information, after modifying the configuration file, it will be OK.
To put it simply, my environment: One Ubuntu physical server (an ssh tool has been installed), One Windows physical server (an XShell remote tool installed (
Apt-get install-y openssh-server
To solve the problem directly, follow these steps:
- Root Login to your Linux
- Vim/etc/ssh/sshd_config edit the configuration file as follows:
Run the ufw disable command to disable the firewall of ubuntu by default.
This root user cannot log on remotely, which may cause another problem. If your root user cannot log on remotely, when you use WinSCP for remote file transfer, normal users cannot be used, and permissions may occur. If you use root for connection, no problems will occur.
References: Baidu encyclopedia