<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>SSH on Margrop Blog</title>
    <link>https://blog.margrop.net/en/tag/ssh/</link>
    <description>Recent content in SSH on Margrop Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-US</language>
    <lastBuildDate>Sun, 05 Jul 2026 06:50:00 +0800</lastBuildDate>
    <atom:link href="https://blog.margrop.net/en/tag/ssh/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Stop Fighting Over the Remote: Use DSM Scheduled Tasks to Lock a Kids&#39; Video Folder Automatically</title>
      <link>https://blog.margrop.net/en/post/synology-kid-video-acl-curfew/</link>
      <pubDate>Sun, 05 Jul 2026 06:50:00 +0800</pubDate>
      <guid>https://blog.margrop.net/en/post/synology-kid-video-acl-curfew/</guid>
      <description>&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;Short version&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;This is not an account lockout guide. The goal is narrower and cleaner: lock one kids&amp;rsquo; video folder on a Synology DSM 7.2.1 NAS during selected hours, while leaving the account, password, homework folders, photo folders, and other shares alone. The script inserts one temporary &lt;code&gt;deny&lt;/code&gt; ACL entry with &lt;code&gt;synoacltool&lt;/code&gt;, removes that entry during open windows, backs up the ACL before each change, and verifies the result after each operation.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;&lt;img alt=&#34;Original cover: the kids&amp;rsquo; video folder is locked by schedule&#34; src=&#34;https://blog.margrop.net/post-images/synology-kid-video-acl-curfew/00-ai-cover.png&#34;&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Stop Treating Passkeys as SSH Passwords: The Right Way to Use SSH Keys and Phone/Desktop Passkeys</title>
      <link>https://blog.margrop.net/en/post/ssh-passwordless-login-passkeys-correct-use/</link>
      <pubDate>Tue, 30 Jun 2026 09:30:00 +0800</pubDate>
      <guid>https://blog.margrop.net/en/post/ssh-passwordless-login-passkeys-correct-use/</guid>
      <description>&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;Short version&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;SSH passwordless login and passkeys on phones, Macs, and Windows PCs both use the public-key idea, but they are not the same tool. SSH keys are for logging in to servers, Git remotes, jump boxes, and automation endpoints. Passkeys are for signing in to websites, apps, and account systems. They are like two modern key rings: one opens the machine-room door, the other opens your online account door. The cryptographic idea is related, but the locks are different.&lt;/p&gt;&#xA;&lt;p&gt;The practical rule is simple: generate a separate SSH key on each client device, keep the private key only on that device or inside a hardware security key, and put only the public key on the server. Verify public-key login before disabling password login. Use passkeys through iPhone, Android, macOS 26, Windows 11, system password managers, or hardware security keys for website and app sign-in. Do not try to paste a phone passkey into &lt;code&gt;authorized_keys&lt;/code&gt;. This post includes one-click scripts for Windows 11, Ubuntu 26.04, and macOS 26, plus a manual automation path and an Agent-driven configuration path. The examples do not depend on any third-party service and do not contain real internal addresses, full computer names, private domains, or secrets.&lt;/p&gt;&#xA;&lt;/blockquote&gt;</description>
    </item>
    <item>
      <title>Synology locked root behind three doors — I spent twenty minutes teaching it how to let me back in</title>
      <link>https://blog.margrop.net/en/post/synology-root-and-ssh-key/</link>
      <pubDate>Thu, 18 Jun 2026 16:30:00 +0800</pubDate>
      <guid>https://blog.margrop.net/en/post/synology-root-and-ssh-key/</guid>
      <description>&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Synology DSM, by design, ships with SSH &lt;strong&gt;disabled&lt;/strong&gt; and root login &lt;strong&gt;prohibited&lt;/strong&gt; — both sensible defaults. This guide walks you through &amp;ldquo;doing it the right way&amp;rdquo;:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;Control Panel → Terminal &amp;amp; SNMP → Enable SSH&lt;/strong&gt; (open the gate)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Log in as a normal user, then &lt;code&gt;sudo -i&lt;/code&gt; to become root&lt;/strong&gt; (borrow the landlord&amp;rsquo;s key first)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Edit &lt;code&gt;/etc/ssh/sshd_config&lt;/code&gt; and set &lt;code&gt;PermitRootLogin yes&lt;/code&gt;&lt;/strong&gt; (tell the bouncer &amp;ldquo;root is family&amp;rdquo;)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;&lt;code&gt;synouser --setpw root xxx&lt;/code&gt; to set a root password, and append your public key to &lt;code&gt;~/.ssh/authorized_keys&lt;/code&gt;&lt;/strong&gt; (hand back a key that can never be lost)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Total time: about twenty minutes. I&amp;rsquo;ll explain &lt;em&gt;why&lt;/em&gt; every step exists using a &amp;ldquo;key and lock&amp;rdquo; metaphor, give you a 3-second vi crash course, list the error messages you&amp;rsquo;ll see, and answer the seven most common questions.&lt;/p&gt;&#xA;&lt;/blockquote&gt;</description>
    </item>
    <item>
      <title>Moving Bedtime Out of the Living Room: Letting macOS launchd Disable Your Kids&#39; Synology Accounts at 22:00 and Quietly Re-enable Them at 08:00</title>
      <link>https://blog.margrop.net/en/post/synology-mykid-curfew-launchd/</link>
      <pubDate>Sun, 14 Jun 2026 08:20:00 +0800</pubDate>
      <guid>https://blog.margrop.net/en/post/synology-mykid-curfew-launchd/</guid>
      <description>&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;Short version&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Synology DSM has a &amp;ldquo;disable this account&amp;rdquo; checkbox in the Control Panel, but it does not run on a schedule. With macOS&amp;rsquo;s built-in &lt;code&gt;launchd&lt;/code&gt; and a 50-line bash script, you can flip the &lt;code&gt;expired&lt;/code&gt; flag on two local accounts at 22:00 every night and flip it back at 08:00. The script does a before-query, a change, an after-query, and &lt;code&gt;exit 1&lt;/code&gt; the moment the after state does not match expectations. &lt;code&gt;launchd&lt;/code&gt; writes stdout and stderr to dedicated log files. The interesting part is that the word &amp;ldquo;parent&amp;rdquo; quietly leaves the conversation: you no longer have to remind anyone to go to bed, the machine does it for you, on time, every day.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;This post is not a comprehensive &amp;ldquo;family NAS management&amp;rdquo; guide. It is about one specific thing: turning a manual button click that depends on human memory into a system-level event that just happens on time.&lt;/p&gt;&#xA;&lt;p&gt;If you only want the picture, the overview diagram in Section 2 is the whole article in one frame.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img alt=&#34;Lights out at 22:00, lights on at 08:00&#34; src=&#34;https://blog.margrop.net/post-images/synology-mykid-curfew-launchd/05-curfew-overview.svg&#34;&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>You Can SSH Out, but Not Back In: A Fail2Ban False Positive That Broke Reverse Access</title>
      <link>https://blog.margrop.net/en/post/reverse-ssh-fail2ban-vpn-gateway-investigation/</link>
      <pubDate>Sat, 30 May 2026 15:45:00 +0800</pubDate>
      <guid>https://blog.margrop.net/en/post/reverse-ssh-fail2ban-vpn-gateway-investigation/</guid>
      <description>&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;Bottom line&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;The symptom looked simple: I could SSH from the local machine into a remote internal host, but the reverse SSH path failed when the remote host tried to connect back. &lt;code&gt;sshd&lt;/code&gt; was listening, the route table looked fine, and the failure still happened.&lt;/p&gt;&#xA;&lt;p&gt;The real root cause was not a broken SSH daemon. &lt;code&gt;Fail2Ban&lt;/code&gt; had banned the &lt;strong&gt;VPN gateway address&lt;/strong&gt; that represented the return path. From the local machine&amp;rsquo;s point of view, the incoming SSH session did not appear to come directly from the remote host. It appeared to come from the gateway, so the ban cut off the whole reverse path.&lt;/p&gt;&#xA;&lt;/blockquote&gt;</description>
    </item>
    <item>
      <title>Stop Clicking Remote Desktop: Let AI Agents SSH into Windows Instead</title>
      <link>https://blog.margrop.net/en/post/agent-ssh-windows-openssh/</link>
      <pubDate>Wed, 13 May 2026 08:10:00 +0800</pubDate>
      <guid>https://blog.margrop.net/en/post/agent-ssh-windows-openssh/</guid>
      <description>&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;The short version&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;An AI agent does not need Remote Desktop, VNC, or a proprietary remote-control tool to operate a Windows machine. For many workstations, lab machines, development PCs, and internal servers, the cleanest path is to enable the built-in &lt;strong&gt;OpenSSH Server&lt;/strong&gt; on Windows and connect from Linux or macOS with a normal command: &lt;code&gt;ssh &amp;lt;user&amp;gt;@&amp;lt;windows-host&amp;gt;&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;There are only three things to get right. First, install and enable OpenSSH Server on Windows 10 or Windows 11. Second, generate an SSH key on Linux or macOS and place the public key on Windows. Third, if the target account belongs to the Windows Administrators group, put the public key in &lt;code&gt;C:\ProgramData\ssh\administrators_authorized_keys&lt;/code&gt; and lock down the ACL with &lt;code&gt;icacls&lt;/code&gt;. After that, an AI agent can run PowerShell, copy scripts, collect logs, install tools, and perform repeatable maintenance through the same SSH workflow it already uses for Linux.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;All hostnames, addresses, usernames, screenshots, and commands in this article use generic placeholders. No real internal addresses, usernames, machine names, tokens, keys, or private paths are included. Replace placeholders such as &lt;code&gt;&amp;lt;user&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;windows-host&amp;gt;&lt;/code&gt;, and &lt;code&gt;&amp;lt;windows-ip&amp;gt;&lt;/code&gt; with values from your own environment.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Integrating Synology Operations as an OpenClaw / HermesAgent Skill: From One Sentence to Auditable NAS Automation</title>
      <link>https://blog.margrop.net/en/post/openclaw-hermesagent-synology-skill/</link>
      <pubDate>Tue, 05 May 2026 12:20:00 +0800</pubDate>
      <guid>https://blog.margrop.net/en/post/openclaw-hermesagent-synology-skill/</guid>
      <description>&lt;p&gt;I have already written two Synology CLI references on this blog:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://blog.margrop.net/en/post/synology-ssh-commands/&#34;&gt;Synology SSH Commands Cheatsheet&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://blog.margrop.net/en/post/synology-diskstation-cli-administration-guide/&#34;&gt;Synology NAS CLI Administration Guide&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Those posts answer the question: “What commands can a human run on a Synology NAS?” This article answers a different question: if I already use OpenClaw / HermesAgent, how can I turn those commands into an operations Skill so that I can ask the agent, in one sentence, to inspect the NAS, summarize evidence, prepare a maintenance plan, and execute approved commands only when the risk is acceptable?&lt;/p&gt;&#xA;&lt;p&gt;The short answer is: yes, but the Skill must not become an unrestricted root shell. The right design is:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Make Synology SSH access controlled, testable, and revocable.&lt;/li&gt;&#xA;&lt;li&gt;Put common Synology CLI operations into a Skill, together with command categories, risk levels, and output rules.&lt;/li&gt;&#xA;&lt;li&gt;Allow read-only diagnostics by default.&lt;/li&gt;&#xA;&lt;li&gt;Require explicit approval for service restarts, permission changes, user changes, network changes, deletion, and storage operations.&lt;/li&gt;&#xA;&lt;li&gt;Preserve commands, output, and reasoning so each operation remains auditable.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;If you only want the big picture, the diagram below summarizes the whole article.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img alt=&#34;OpenClaw / HermesAgent Synology Skill overview&#34; src=&#34;https://blog.margrop.net/post-images/openclaw-hermesagent-synology-skill/01-overview-handdrawn.svg&#34;&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>[Transfer] Synology NAS CLI Administration Guide</title>
      <link>https://blog.margrop.net/en/post/synology-diskstation-cli-administration-guide/</link>
      <pubDate>Thu, 30 Apr 2026 18:20:04 +0800</pubDate>
      <guid>https://blog.margrop.net/en/post/synology-diskstation-cli-administration-guide/</guid>
      <description>&lt;p&gt;This guide contains command tools that allow your applications to make use of the resources on Synology DiskStation and also includes a list of Synology Error Numbers for reference.&lt;/p&gt;</description>
    </item>
    <item>
      <title>[Translation] Synology SSH Commands Cheatsheet</title>
      <link>https://blog.margrop.net/en/post/synology-ssh-commands/</link>
      <pubDate>Thu, 30 Apr 2026 10:00:00 +0800</pubDate>
      <guid>https://blog.margrop.net/en/post/synology-ssh-commands/</guid>
      <description>&lt;blockquote&gt;&#xA;&lt;p&gt;Warning: Running these SSH commands may damage your system/hard drive. Do not execute them if you don&amp;rsquo;t understand what they do!&lt;/p&gt;&#xA;&lt;/blockquote&gt;</description>
    </item>
    <item>
      <title>The past and present life of SSH key algorithm Ed25519 and RSA, and how to use it today</title>
      <link>https://blog.margrop.net/en/post/ssh-ed25519-and-rsa-history-and-best-practices/</link>
      <pubDate>Mon, 02 Mar 2026 09:00:00 +0800</pubDate>
      <guid>https://blog.margrop.net/en/post/ssh-ed25519-and-rsa-history-and-best-practices/</guid>
      <description>Many people’s first contact with SSH starts with a line of commands:&#xA;There is nothing wrong with this command, but there is an often overlooked issue behind it: Are we talking about &amp;ldquo;RSA key type&amp;rdquo; or ssh-rsa &amp;ldquo;signature algorithm&amp;rdquo;?&#xA;These two concepts are used interchangeably in many old tutorials, leading many people to think that they are &amp;ldquo;still using old and unsafe solutions&amp;rdquo; and at the same time don&amp;rsquo;t know how to migrate, and even repeatedly step into pitfalls between new systems and old devices.</description>
    </item>
    <item>
      <title>How to Install HACS in Home Assistant</title>
      <link>https://blog.margrop.net/en/post/install-hacs-in-home-assistant/</link>
      <pubDate>Fri, 19 Feb 2021 10:53:04 +0800</pubDate>
      <guid>https://blog.margrop.net/en/post/install-hacs-in-home-assistant/</guid>
      <description>&lt;h1 id=&#34;if-using-a-virtual-machine-environment-home-assistant-os&#34;&gt;If Using a Virtual Machine Environment (Home Assistant OS)&lt;/h1&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Go to the &lt;code&gt;Supervisor&lt;/code&gt; panel&lt;/li&gt;&#xA;&lt;li&gt;Install an SSH add-on (enable advanced mode in your user profile first)&lt;/li&gt;&#xA;&lt;li&gt;Configure the selected SSH add-on&lt;/li&gt;&#xA;&lt;li&gt;Start the SSH add-on&lt;/li&gt;&#xA;&lt;li&gt;Connect to the SSH add-on&lt;/li&gt;&#xA;&lt;li&gt;Run the HACS installation script&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;wget -q -O - https://hacs.xyz/install | bash -&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Latest Synology 6.17: How to Gain Root Access, Set Root Password and Enable SSH Passwordless Login</title>
      <link>https://blog.margrop.net/en/post/dsm-grant-root-permission-and-set-password-and-ssh-login/</link>
      <pubDate>Wed, 10 Feb 2021 20:40:26 +0800</pubDate>
      <guid>https://blog.margrop.net/en/post/dsm-grant-root-permission-and-set-password-and-ssh-login/</guid>
      <description>&lt;h1 id=&#34;1-enable-ssh-function&#34;&gt;1. Enable SSH Function&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;In &lt;code&gt;控制面板&lt;/code&gt;-&amp;gt;&lt;code&gt;终端机和SNMP&lt;/code&gt;, enable the &lt;code&gt;SSH&lt;/code&gt; function&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1 id=&#34;2-log-in-to-synology-via-ssh-using-the-default-system-user&#34;&gt;2. Log in to Synology via SSH Using the Default System User&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;My default user is &lt;code&gt;admin&lt;/code&gt;, so I enter the following command. Modify &lt;code&gt;admin&lt;/code&gt; and &lt;code&gt;IP地址&lt;/code&gt; to match your own settings.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ssh admin@192.168.1.5&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to Configure a Freshly Installed Ubuntu 20.04 Server VM on PVE</title>
      <link>https://blog.margrop.net/en/post/pve-how-to-config-brand-new-ubuntu-20.04-vm/</link>
      <pubDate>Sat, 30 Jan 2021 15:33:44 +0800</pubDate>
      <guid>https://blog.margrop.net/en/post/pve-how-to-config-brand-new-ubuntu-20.04-vm/</guid>
      <description>&lt;h1 id=&#34;download-the-installation-iso&#34;&gt;Download the Installation ISO&lt;/h1&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://mirrors.aliyun.com/ubuntu-releases/focal/ubuntu-20.04.2-live-server-amd64.iso&#34;&gt;Aliyun Ubuntu 20.04 live server download&lt;/a&gt;&#xA;&lt;a href=&#34;https://mirrors.aliyun.com/ubuntu-releases/bionic/ubuntu-18.04.5-live-server-amd64.iso&#34;&gt;Aliyun Ubuntu 18.04 live server download&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Installing Frp Client on CentOS with SSH Access</title>
      <link>https://blog.margrop.net/en/post/centos-install-frp-client-for-ssh/</link>
      <pubDate>Sat, 23 Jan 2021 17:22:58 +0800</pubDate>
      <guid>https://blog.margrop.net/en/post/centos-install-frp-client-for-ssh/</guid>
      <description>&lt;h1 id=&#34;download-and-extract-frp&#34;&gt;Download and Extract Frp&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Latest Frp download address: &lt;a href=&#34;https://github.com/fatedier/frp/releases/&#34;&gt;https://github.com/fatedier/frp/releases/&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mkdir ~/frp&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd ~/frp&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;wget https://github.com/fatedier/frp/releases/download/v0.35.0/frp_0.35.0_linux_amd64.tar.gz&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;tar -xvzf frp_0.35.0_linux_amd64.tar.gz&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Initialization script after Proxmox VE installation</title>
      <link>https://blog.margrop.net/en/post/proxmox-ve-init-bash-script/</link>
      <pubDate>Fri, 22 Jan 2021 16:42:46 +0800</pubDate>
      <guid>https://blog.margrop.net/en/post/proxmox-ve-init-bash-script/</guid>
      <description>&lt;p&gt;In order to facilitate the installation of PVE, I compiled the relevant commands myself. Please modify them according to your own environment.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
