方法1:
创建实例时候添加命令
在创建实例的时候,一定要输入SSH密钥
如果你怕那个比较麻烦!那么利用 cloud-init脚本来开启root账号密码登录!
![图片[1]-Oracle Cloud(甲骨文)开启root登录-ぷWen-One Man](https://img10.360buyimg.com/img/jfs/t1/44225/4/15591/37878/5d846fedE1950d239/d922d9bb5ae5009c.png)
![图片[2]-Oracle Cloud(甲骨文)开启root登录-ぷWen-One Man](https://img10.360buyimg.com/img/jfs/t1/51854/40/11229/79125/5d847007Ed33b6b1a/5391657d9bded7cd.png)
方法2:
使用密钥登录系统以后
执行如下命令
sudo -i passwd按提示刷入密码,重复输入密码。 接着输入echo root:vipkj.net |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重启sshd服务sudo service sshd restart
© 版权声明
文章版权归www.vipkj.net所有,未经允许请勿转载。
THE END


暂无评论内容