AWS Lightsail 开启 Root 登陆权限
文章目录
将下面代码中的第一句中的 Passwd 改为自己将要设置的密码,否则默认 root 密码为 Passwd 。
#!/bin/bash
echo root:Passwd |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
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论