AWS Lightsail,EC2, GCP, AZURE,开启root登陆权限
启动脚本设置为
#!/bin/bash
echo root:yourpassword |sudo chpasswd root
sudo sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config;
sudo sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config;
sudo reboot
- 上一篇: scp局域网传输文件
- 下一篇: 使用tree打印目录结构