Hot Article
- Centos7 closes and restarts the system firewall and opens firewall ports
- How IID server uses Xshell to connect to Linux (centos) server
- BT panel forgets the background login URL, and the solution to the security entrance verification failure
- What to do if a cp: omitting directory error occurs in Linux (detailed solution)
- Error connecting to MySQL: Cant connect to MySQL server (10060)
- The php domain name points to ip, how to use the specified ip address to access a server in the url request domain name in curl mode
IDGlobal teaches you how to set up root remote login in Ubuntu SSH
- Author:Ke
- Category:Server Maintain
- Release Time:2022-11-29
Ubuntu system does not set a password for root by default, and does not enable SSH login. How do we enable root login? The following IDGlobal server merchants will introduce to you how
sudo passwd root After the execution, set a password for root, and it will ask you to enter the password of the current user for verification. Non-administrator users need to add sudo
su – root to switch to the root account, and enter the above settings root password
vi /etc/ssh/sshd_config edit sshd_config file
press i or press o or press a< /strong> Or press R to enter edit mode
found
PermitRootLogin without-password
or
PermitRootLogin prohibit-password
Comment out
#PermitRootLogin without-password
or#PermitRootLogin prohibit-password
Or just delete
Some system versions are commented out by default, just add another line
Adding PermitRootLogin yes is to allow SSH remote login
Press and hold ctrl+C or press esc to exit the editing mode
Then press shift+: it means input in the last line:
Input wq! Force to save and exit
Restart the SSH service to take effect: service ssh restart
related topic
- How to install the system on the game server host?
- How to do if phpstudy port 80 is occupied (perfect solution)
- How to restart the Redis service command
- What should I do if the cloud storage space is full (solutions for clearing the cloud storage space)
- What should I do if I lose connection to the game server of Legend M international service? (Detailed solution)
- centos7 open and close 80 port tutorial