<?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 Besterry — Linux &amp; DevOps Notes</title><link>https://besterry.com/tags/ssh/</link><description>Recent content in Ssh on Besterry — Linux &amp; DevOps Notes</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 01 Apr 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://besterry.com/tags/ssh/index.xml" rel="self" type="application/rss+xml"/><item><title>SSH Hardening Checklist for Public VPS</title><link>https://besterry.com/posts/ssh-hardening/</link><pubDate>Mon, 01 Apr 2024 00:00:00 +0000</pubDate><guid>https://besterry.com/posts/ssh-hardening/</guid><description>&lt;p&gt;Every public-facing server gets port-scanned within minutes of going online. Default SSH settings are decent but not great. Here is the checklist I run through on every new VPS.&lt;/p&gt;
&lt;h2 id="disable-password-authentication"&gt;Disable password authentication&lt;/h2&gt;
&lt;p&gt;In /etc/ssh/sshd_config:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;PasswordAuthentication no
PubkeyAuthentication yes
ChallengeResponseAuthentication no
KbdInteractiveAuthentication no
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id="restrict-root-login"&gt;Restrict root login&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;PermitRootLogin prohibit-password
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This allows root login with key but not password, which is fine for automation. For stricter setups, use no and sudo from an unprivileged user.&lt;/p&gt;</description></item></channel></rss>