I met this problem very early, but today I thought of solving it. In other words, when Ubuntu is installed, remote SSH login is forbidden. Every time you have to use a normal user ssh telnet, and then su switch to root so, for obsessive-compulsive disorder I really is very difficult to tolerate, so find a bit of information, modify the configuration file is ok.
Briefly say my environment: Ubuntu Physical Machine (has installed the SSH tool), a Windows physical machine (installed with Xshell Remote Tools), about the installation problem ( apt-get install -y openssh-server
) do not say, directly solve the problem, the steps are as follows:
- Root Login to your Linux
- Vim/etc/ssh/sshd_config edit this configuration file as follows:
- Because root set the password, so also modify the following content, if no, then do not have to modify:
- To restart the SSH service:
Off Topic
Ubuntu default firewall off command: UFW disable
About this root can not telnet, but also cause another problem, if your root can not log in remotely, then you use WINSCP for remote file transfer, the use of ordinary users is not possible, will be subject to permissions, and use root to connect, there will be no problem.
Reference: Baidu Encyclopedia
Enable Ubuntu root Telnet