谷歌云 一键root登录有没有
和aws一样输入命令就能root登录的多谢大佬 我有,不告诉你,不喜欢伸手党。 好吧 我搜一下 找到了 分享一下
设置root密码
2.切换到root账号
sudo -i
3.设置root密码
passwd
开启SSH权限
CentOS和Debian通用,输入以下两条命令
sed -i 's/PermitRootLogin no/PermitRootLogin yes/g' /etc/ssh/sshd_config
sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config
Ubuntu系统,输入以下两条命令
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config
sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config
重启服务器
reboot 对,就这个,你真效率。:victory: 直接dd 123 aws 输入命令就能root登录的代码请分享以下 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 service sshd restart
页:
[1]