<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hardening on Linux Security</title><link>https://linuxtransfer.com/tags/hardening/</link><description>Recent content in Hardening on Linux Security</description><generator>Hugo</generator><language>en</language><lastBuildDate>Mon, 05 Oct 2026 08:06:56 +0200</lastBuildDate><atom:link href="https://linuxtransfer.com/tags/hardening/index.xml" rel="self" type="application/rss+xml"/><item><title>Why ssh keeps asking for a password after adding a key and how to correct the PubkeyAuthentication setting</title><link>https://linuxtransfer.com/post/2026-10-05-whysshkeeps-asking-for-a-password-after-addin/</link><pubDate>Mon, 05 Oct 2026 08:06:56 +0200</pubDate><guid>https://linuxtransfer.com/post/2026-10-05-whysshkeeps-asking-for-a-password-after-addin/</guid><description>&lt;h2 id="why-ssh-still-asks-for-a-password-after-adding-a-key">Why SSH Still Asks for a Password After Adding a Key&lt;/h2>
&lt;p>Adding a public key to &lt;code>~/.ssh/authorized_keys&lt;/code> is the first step toward password‑less login, but the SSH daemon can still fall back to password authentication for a handful of reasons. The most common culprit is a mis‑configured &lt;code>PubkeyAuthentication&lt;/code> setting in &lt;code>/etc/ssh/sshd_config&lt;/code> or a permissions problem that causes the server to ignore the key file.&lt;/p>
&lt;hr>
&lt;h3 id="1-verify-the-key-is-accepted-by-the-server">1. Verify the Key Is Accepted by the Server&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># On the client&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">ssh -vvv user@host
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The &lt;code>-vvv&lt;/code> flag prints the entire authentication dance. Look for lines like:&lt;/p></description></item></channel></rss>