Oracle云服务器(虚机实例)创建创建完成后,打开FinalShell(可以使用其他Shell登录工具)配置好相应的信息。
在此注意以下两点:
- 用户名是:Centos系统默认账户是opc;Ubuntu系统默认账户是ubuntu
- 配置使用私钥,而不是使用密码(公钥在创建服务器实例时有提示下载)
登录完成后:
#切换至root模式,并更改root的密码 $ sudo -i passwd #启用SSH vim /etc/ssh/sshd_config #更改如下 PermitRootLogin yes PasswordAuthentication yes #或使用如下命令 sudo sed -i 's/^#?PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config; sudo sed -i 's/^#?PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config; #重启sshd服务 sudo service sshd restart
现在就可以使用root来ssh登录了。
references:
https://www.veidc.com/28119.html



