<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>SSH on 听风小筑</title><link>https://m3j6v.667775.xyz/tags/ssh/</link><description>Recent content in SSH on 听风小筑</description><generator>Hugo</generator><language>zh-cn</language><lastBuildDate>Fri, 03 Apr 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://m3j6v.667775.xyz/tags/ssh/index.xml" rel="self" type="application/rss+xml"/><item><title>把密码登录彻底关掉</title><link>https://m3j6v.667775.xyz/posts/stop-password-login/</link><pubDate>Fri, 03 Apr 2026 00:00:00 +0000</pubDate><guid>https://m3j6v.667775.xyz/posts/stop-password-login/</guid><description>只留密钥登录，少一扇门。</description><content:encoded><![CDATA[<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>ssh-keygen -t ed25519 -C <span style="color:#e6db74">&#34;me@example.com&#34;</span>
</span></span><span style="display:flex;"><span>ssh-copy-id -p <span style="color:#ae81ff">2222</span> user@host
</span></span></code></pre></div><h2 id="改-sshd-配置">改 sshd 配置</h2>
<pre tabindex="0"><code>PasswordAuthentication no
PermitRootLogin prohibit-password
ChallengeResponseAuthentication no
</code></pre><h2 id="别急着断">别急着断</h2>
<p><code>sshd -t</code> 检查语法，再 <code>systemctl reload sshd</code>。</p>
<p><strong>先开一个新终端验证能登</strong>，确认没问题再关掉老会话。锁在门外就麻烦了。</p>
]]></content:encoded></item></channel></rss>