现在的位置: 首页 > 电脑相关 > 正文
谷歌云开机自动开启root账户脚本
2019年11月02日 电脑相关 ⁄ 共 261字 暂无评论

#!/bin/bash
root:密码 |sudo chpasswd root
sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config;
sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config;
service sshd restart

提示:密码替换为你自己想要设置的root账号密码即可.这样创建完实例后即可使用root账号登陆小🐔了

建伟

给我留言

留言无头像?



×