1、先选择从浏览器打开ssh连接服务器
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
2、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
3、重启服务器,输入命令:reboot
直接dd
有没有可能创建实例的时候就可以这么干
yg脚本不错
wget -N https://gitlab.com/rwkgyg/vpsroot/raw/main/root.sh && bash root.sh@zxzx412 #2 那我不知道
重启ssh不就够了,不用重启机子
上来先dd
@贪财好色 #3 开源了,但没有完全开源
感谢
666
666