Debian设置允许root用户以ssh方式登录
<p>debian默认不允许以root用户登录,必须以其他用户登录,然后su命令切换到root用户才可以操作<br>1.修改/etc/ssh/sshd_config文件</p>
<pre><code class="language-bash">#将以下配置改为:PermitRootLogin yes
#PermitRootLogin prohibit-password
</code></pre>
<p>然后重启ssh服务,即可</p>
<pre><code class="language-bash">service sshd restart
</code></pre>
<p>2.顺便写一下允许root用户登录系统<br>
2.1修改/etc/gdm3/daemon.conf文件,新增</p>
<pre><code class="language-bash">
AllowRoot = true
</code></pre>
<p>2.2修改/etc/pam.d/gdm-password,注释掉以下内容:</p>
<pre><code class="language-bash">#auth required pam_succeed_if.so user != root quiet_success
</code></pre>
<p>重启系统即可</p>
</div>
<div id="MySignature" role="contentinfo">
<p align="left"><font color="#CA0C16" size="2">★转载请注明出处及作者★</font></p> <p align="left"><font color="#FFA500" size="5"><b>流柯</font></p><p align="center"><button type="button" class="btn" style="background-color: #CA0C16;border-color:#CA0C16;width: 80px;height: 36px;color: #FFFFFF" onclick="reP()"><b>赞 赏</button><img src='https://images.cnblogs.com/cnblogs_com/liu-ke/1355767/o_200613093917qrcode_700.png' id="oImg" style='display:none' width="200px" hight="200px"><br><br>
来源:https://www.cnblogs.com/liu-ke/p/14166097.html
頁:
[1]