From afb5d22d2e45bf0b3d35151dd288461e3ae041cc Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 1 Jun 2026 21:49:06 +0000 Subject: [PATCH 1/2] Update NetBird SSH for v0.60.0+ breaking change in 26.04 script NetBird v0.60.0 removed the built-in SSH server ('netbird ssh '). SSH now routes through standard openssh-server via a drop-in config at /etc/ssh/sshd_config.d/99-netbird.conf on port 22022. - Ensure openssh-server is installed and enabled when NetBird is selected - Remove all 'netbird ssh ' references - Update instructions: connect via 'ssh user@' using netbird status - Note the dashboard step: Peers > [peer] > SSH to enable per-peer SSH access - Applied across install section, SSH summary, and next-steps section https://claude.ai/code/session_017jFG5YuHf2CCGS5HiheoeM --- ubuntu-post-install-26.04.sh | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/ubuntu-post-install-26.04.sh b/ubuntu-post-install-26.04.sh index a85ea45..045e7e3 100644 --- a/ubuntu-post-install-26.04.sh +++ b/ubuntu-post-install-26.04.sh @@ -2195,7 +2195,15 @@ if [ "$INSTALL_NETBIRD" = "y" ] || [ "$INSTALL_NETBIRD" = "Y" ]; then if [ "$DRY_RUN" = true ]; then echo "[DRY-RUN] Would download and run NetBird install script" + echo "[DRY-RUN] Would ensure openssh-server is installed (required for NetBird SSH)" else + # NetBird v0.60.0+ requires openssh-server for SSH access. + # It injects /etc/ssh/sshd_config.d/99-netbird.conf and listens on port 22022. + echo "Ensuring openssh-server is installed (required for NetBird SSH)..." + apt install -y openssh-server 2>/dev/null || echo "Warning: openssh-server install failed, continuing..." + systemctl enable ssh 2>/dev/null || true + systemctl start ssh 2>/dev/null || true + curl -fsSL https://pkgs.netbird.io/install.sh | sh || echo "Warning: NetBird installation failed, continuing..." echo "" @@ -2203,12 +2211,13 @@ if [ "$INSTALL_NETBIRD" = "y" ] || [ "$INSTALL_NETBIRD" = "Y" ]; then echo " 1. Create account at https://app.netbird.io (or self-host)" echo " 2. Run 'netbird up' and authenticate via browser" echo "" - echo "For NetBird SSH functionality:" - echo " • Enable SSH in NetBird dashboard settings" - echo " • Use 'netbird ssh ' to connect to peers" - echo " • NetBird manages SSH keys automatically when using 'netbird ssh'" - echo " • Traditional SSH also works using peer IPs from 'netbird status'" - echo " • Configure ACL rules in dashboard for SSH access (port 22)" + echo "For NetBird SSH functionality (v0.60.0+ new method):" + echo " • NetBird now uses openssh-server (installed above) for SSH access" + echo " • Enable SSH per-peer in the NetBird dashboard (Peers > [peer] > SSH)" + echo " • NetBird injects /etc/ssh/sshd_config.d/99-netbird.conf automatically" + echo " • Connect from another NetBird peer with: ssh user@" + echo " • Get peer IPs with: netbird status" + echo " • Note: 'netbird ssh ' (old command) no longer works" echo "" fi else @@ -7554,11 +7563,13 @@ else echo " - Password login: ENABLED" fi echo "" -echo " NetBird SSH Access (independent of traditional SSH):" -echo " - NetBird manages its own keys automatically" -echo " - Works even with password auth disabled" -echo " - Connect with: netbird ssh " -echo " - Enable in NetBird dashboard first" +echo " NetBird SSH Access (v0.60.0+ method):" +echo " - Requires openssh-server running (installed by this script)" +echo " - Enable per-peer in NetBird dashboard: Peers > [peer] > SSH" +echo " - NetBird injects /etc/ssh/sshd_config.d/99-netbird.conf" +echo " - Connect from another peer: ssh user@" +echo " - Get peer IPs with: netbird status" +echo " - Note: old 'netbird ssh ' command no longer works" echo "" echo " You can use ANY combination:" echo " ✓ GitHub + Launchpad + NetBird SSH" @@ -7626,6 +7637,8 @@ if [ "$INSTALL_NETBIRD" = "y" ] || [ "$INSTALL_NETBIRD" = "Y" ]; then echo " 1. Run 'netbird up' (opens browser for authentication)" echo " 2. View connected peers: netbird status" echo " 3. Configure ACLs in dashboard: https://app.netbird.io" + echo " 4. Enable SSH per-peer: Peers > [peer] > SSH (in dashboard)" + echo " 5. Connect via SSH: ssh user@ (NOT 'netbird ssh')" echo "" fi if [ "$INSTALL_RUSTDESK" = "y" ] || [ "$INSTALL_RUSTDESK" = "Y" ]; then From d790d09295bfed638b01cfb8d746d414f21490af Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 1 Jun 2026 21:51:34 +0000 Subject: [PATCH 2/2] Persist --allow-server-ssh in netbird systemd override Without --allow-server-ssh, NetBird prompts for re-authentication on every SSH connection. This adds a systemd drop-in override at /etc/systemd/system/netbird.service.d/ssh-server.conf so the flag is set automatically on every boot without manual intervention. https://claude.ai/code/session_017jFG5YuHf2CCGS5HiheoeM --- ubuntu-post-install-26.04.sh | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/ubuntu-post-install-26.04.sh b/ubuntu-post-install-26.04.sh index 045e7e3..33306b0 100644 --- a/ubuntu-post-install-26.04.sh +++ b/ubuntu-post-install-26.04.sh @@ -2196,6 +2196,7 @@ if [ "$INSTALL_NETBIRD" = "y" ] || [ "$INSTALL_NETBIRD" = "Y" ]; then if [ "$DRY_RUN" = true ]; then echo "[DRY-RUN] Would download and run NetBird install script" echo "[DRY-RUN] Would ensure openssh-server is installed (required for NetBird SSH)" + echo "[DRY-RUN] Would configure netbird systemd service with --allow-server-ssh" else # NetBird v0.60.0+ requires openssh-server for SSH access. # It injects /etc/ssh/sshd_config.d/99-netbird.conf and listens on port 22022. @@ -2206,18 +2207,30 @@ if [ "$INSTALL_NETBIRD" = "y" ] || [ "$INSTALL_NETBIRD" = "Y" ]; then curl -fsSL https://pkgs.netbird.io/install.sh | sh || echo "Warning: NetBird installation failed, continuing..." + # Persist --allow-server-ssh so this machine accepts NetBird SSH connections + # without requiring interactive re-authentication on every connection. + echo "Configuring NetBird to allow SSH server (persistent across reboots)..." + mkdir -p /etc/systemd/system/netbird.service.d + cat > /etc/systemd/system/netbird.service.d/ssh-server.conf << 'NETBIRD_OVERRIDE' +[Service] +ExecStart= +ExecStart=/usr/bin/netbird service run --allow-server-ssh +NETBIRD_OVERRIDE + systemctl daemon-reload 2>/dev/null || true + echo " ✓ NetBird will start with --allow-server-ssh on every boot" + echo "" echo "NetBird installed. Setup instructions:" echo " 1. Create account at https://app.netbird.io (or self-host)" echo " 2. Run 'netbird up' and authenticate via browser" echo "" - echo "For NetBird SSH functionality (v0.60.0+ new method):" - echo " • NetBird now uses openssh-server (installed above) for SSH access" + echo "For NetBird SSH functionality (v0.60.0+ method):" + echo " • openssh-server is installed and --allow-server-ssh is persisted" echo " • Enable SSH per-peer in the NetBird dashboard (Peers > [peer] > SSH)" echo " • NetBird injects /etc/ssh/sshd_config.d/99-netbird.conf automatically" - echo " • Connect from another NetBird peer with: ssh user@" + echo " • Connect from another NetBird peer: ssh user@" echo " • Get peer IPs with: netbird status" - echo " • Note: 'netbird ssh ' (old command) no longer works" + echo " • SSH will work without re-authenticating each connection" echo "" fi else @@ -7638,7 +7651,10 @@ if [ "$INSTALL_NETBIRD" = "y" ] || [ "$INSTALL_NETBIRD" = "Y" ]; then echo " 2. View connected peers: netbird status" echo " 3. Configure ACLs in dashboard: https://app.netbird.io" echo " 4. Enable SSH per-peer: Peers > [peer] > SSH (in dashboard)" - echo " 5. Connect via SSH: ssh user@ (NOT 'netbird ssh')" + echo " 5. Connect via SSH: ssh user@" + echo " Note: --allow-server-ssh is pre-configured in systemd override" + echo " (/etc/systemd/system/netbird.service.d/ssh-server.conf)" + echo " so SSH works without re-authenticating on every connection" echo "" fi if [ "$INSTALL_RUSTDESK" = "y" ] || [ "$INSTALL_RUSTDESK" = "Y" ]; then