[scode type="yellow" size=""] 1. 首先从浏览器打开ssh连接服务器 2. 切换到root账号,输入代码:sudo -i 3. 设置root密码,输入代码:passwd 然后会要求输入新密码,然后再重复一次密码,输入密码的时候不会显示出来,所以直接输入密码,然后回车,再然后重复输入密码回车 [/scode] **开启SSH权限方法** - CentOS和Debian命令 ```abap sed -i 's/PermitRootLogin no/PermitRootLogin yes/g' /etc/ssh/sshd_config ``` ```abap sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config ``` - Ubuntu命令 ```abap sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config ``` ```abap sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config ``` - 输入命令:reboot 重启服务器 Loading... <div class="tip inlineBlock warning"> 1. 首先从浏览器打开ssh连接服务器 2. 切换到root账号,输入代码:sudo -i 3. 设置root密码,输入代码:passwd 然后会要求输入新密码,然后再重复一次密码,输入密码的时候不会显示出来,所以直接输入密码,然后回车,再然后重复输入密码回车 </div> **开启SSH权限方法** - CentOS和Debian命令 ```abap sed -i 's/PermitRootLogin no/PermitRootLogin yes/g' /etc/ssh/sshd_config ``` ```abap sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config ``` - Ubuntu命令 ```abap sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config ``` ```abap sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config ``` - 输入命令:reboot 重启服务器 ◈ 最后修改:2023 年 05 月 12 日 © 允许规范转载 打赏 赞赏作者 支付宝微信 赞 如果觉得我的文章对你有用,请随意赞赏