jhtone
jhtone
Published on 2024-09-15 / 12 Visits
1
0

亚马逊(AWS)

ec2实例使用root权限登录

#!/bin/bash
echo root:密码 |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


Comment