

甲骨文云 服务器 Oracle Cloud 如何启用root登录
source link: https://vps.la/2022/12/22/%e7%94%b2%e9%aa%a8%e6%96%87%e4%ba%91-%e6%9c%8d%e5%8a%a1%e5%99%a8-oracle-cloud-%e5%a6%82%e4%bd%95%e5%90%af%e7%94%a8root%e7%99%bb%e5%bd%95/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

甲骨文云 服务器 Oracle Cloud 如何启用root登录-VPS啦
1.利用 cloud-init脚本来开启root账号密码登录
脚本如下:
#!/bin/bashecho root:329105sz |sudo chpasswd rootsudo 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
默认密码是: 329105sz
登录后一定要修改密码!命令:passwd
2.使用密钥登录系统以后
执行如下命令
sudo -i
passwd
按提示刷入密码,重复输入密码。
接着输入
echo root:329105sz |sudo chpasswd rootsudo sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config;sudo sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config;service sshd restart
重启sshd服务
sudo service sshd restart
3、使用密钥登录系统以后
sudo -ivi /root/.ssh/authorized_keys
把ssh-rsa之前的内容都删除掉.
vi /etc/ssh/sshd_config
找到PermitRootLogin, 把前面的#去掉
更改为 PermitRootLogin yes
找到PasswordAuthentication
更改为 PasswordAuthentication yes
退出编辑passwd
更改密码reboot
重启vps
所用到的命令;vi
文本编辑器cd
进入目录pwd
查看当前位置ls
查看当前文件夹文件ls -a
查看当前文件夹所有文件vi
编辑器命令i
进入编辑模式esc
回到命令模式:wq
保存并退出
未经允许不得转载:VPS啦 » 甲骨文云 服务器 Oracle Cloud 如何启用root登录
Recommend
-
195
最近新发现的好东西,永久免费甲骨文云Oracle Cloud。甲骨文云Oracle Cloud说明最多创建2台实例,各自包含一条公网IP(IP地区仅限申请时选择的区域)。免费实例配置如下:1/8 OCPU 和 1 GB 内存20GB存储空间(顺便说...
-
9
oracle如何创建VM服务器 甲骨文oracle创建VM服务器实例详细图文教程 2021-10-1909...
-
11
本站甲骨文云 Oracle Cloud 系列文章汇总页面收集所有相关文章,方便查阅,欢迎收藏。本文为 Stille
-
12
甲骨文云 Oracle Cloud 的 ARM 服务器在安装军哥 LNMP.org的环境时会报错,主要有php和mariadb的问题,经过官方论坛的回复已经解决,完美安装到ARM服务器上。本文为
-
6
甲骨文云 Oracle Cloud 的存储服务叫块存储卷,英文Block Volume,其实也就是常规云服务商的磁盘,其中分为块存储卷和引导卷.本文将介绍两者的区别,挂载方式,磁盘额度以及...
-
15
V2EX › 分享发现 甲骨文 oracle 永久免费登录后顶部出“现回收闲置的始终免费计算资源”
-
20
甲骨文云 Oracle Cloud 服务器防回收保活 docker 命令 近期甲骨文出台了...
-
4
首页技术宅甲骨文 Oracle ARM服务器 自动抢服务器脚本 ,成功后使用TG发送通知!甲骨文 Oracle ARM服务器 自动抢服务器脚本 ,成...
-
4
甲骨文云(Oracle Cloud)升级付费账户,免费云服务器不再被停用了 我是小马甲~...
-
6
随着X的不断加高,IPV6越来越成为一个替代选择,目前各大云厂商都陆续支持了IPV6,我们来看看乌龟壳如何开启IPV6吧。 进入虚拟云网络 登录控制面板,在右上角更改控制台语言为中文,进入菜单,依次选择“网络”→“虚拟云网络”。
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK