当前位置:网站首页>Google cloud SSH enable root password login

Google cloud SSH enable root password login

2022-06-25 19:04:00 Ah, my goose one five and

Modify the configuration

1. First select open from browser ssh Connect to server
After the connection login succeeds , Enter the following command

 

sudo -i  # Switch to root
passwd   # Change Password 

You will then be asked to enter a new password , Then repeat the password again , The password will not be displayed when you enter it , So enter the password directly , And then go back , Then enter the password repeatedly and press enter .

modify root Password complete

2. Then modify SSH The configuration file /etc/ssh/sshd_config

 

vi /etc/ssh/sshd_config # Edit the file 

Find the following and modify

 

PermitRootLogin yes // The default is no, Need to open root User access is changed to yes
PasswordAuthentication yes // The default is no, Change it to yes Open password login 

After the modification is completed , Press again esc key , And then you type in

 

:wq   # Save and exit 

3. Finally, restart the server

 

reboot    # Restart the server 

Login example

external ip Address

external id Address .png

Sign in

Login example .png

If you cannot connect, you can view the firewall rules

 

原网站

版权声明
本文为[Ah, my goose one five and]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202190529057857.html