Skip to content

Instantly share code, notes, and snippets.

@jpleva91
Created April 10, 2026 00:20
Show Gist options
  • Select an option

  • Save jpleva91/cb441c9a77ffc78d07ac66b7977cb8c1 to your computer and use it in GitHub Desktop.

Select an option

Save jpleva91/cb441c9a77ffc78d07ac66b7977cb8c1 to your computer and use it in GitHub Desktop.
Unified Tailscale+SSH setup: Claude Desktop + VS Code + Obsidian → Linux server (Windows & Mac)

Unified Multi-App Connection to Linux Server via Tailscale + SSH

Date researched: 2026-04-09 Sources: github.com/winfsp/sshfs-win, tailscale.com/docs, code.claude.com/docs, help.obsidian.md

Goal

Single connection mechanism (Tailscale + SSH) that serves all dev tools:

  • Claude Desktop (SSH session to remote Linux box)
  • Obsidian (SSHFS-mounted vault from same Linux box)
  • VS Code (Remote-SSH extension to same box)

All use SSH over Tailscale. One tunnel, three apps. Works from Windows or Mac.


Architecture

Windows or Mac Desktop                   Linux Server
┌─────────────────┐    Tailscale VPN    ┌──────────────────┐
│ Claude Desktop   │───── SSH ──────────│ Claude Code CLI   │
│ VS Code          │───── SSH ──────────│ workspace/        │
│ Obsidian         │───── SSHFS ────────│ workspace/wiki/   │
└─────────────────┘                    └──────────────────┘
         All connections go through Tailscale mesh VPN
         No port forwarding, no public IP needed

Part 1: Tailscale Setup (One-Time, Both Machines)

On the Linux box:

# Install Tailscale
curl -fsSL https://tailscale.com/install.sh | sh

# Start and authenticate
sudo tailscale up

# Enable Tailscale SSH (optional -- lets you skip key management)
sudo tailscale set --ssh

# Verify
tailscale status
# Note the Tailscale IP (e.g., 100.x.y.z) or MagicDNS hostname

On the Windows machine:

  1. Download Tailscale from https://tailscale.com/download/windows
  2. Install and sign in with the same account
  3. Verify connection:
    tailscale status
    # Should show the Linux box with its Tailscale IP

On the Mac:

# Option A: Homebrew
brew install tailscale

# Option B: Mac App Store
# Search "Tailscale" and install

Sign in with the same account. Verify with tailscale status.

ACL Configuration (Tailscale Admin Console)

Visit https://login.tailscale.com/admin/acls and ensure SSH access is allowed:

{
  "grants": [
    {
      "src": ["your-email@domain.com"],
      "dst": ["tag:server"],
      "ip": ["22"]
    }
  ],
  "ssh": [
    {
      "action": "accept",
      "src": ["your-email@domain.com"],
      "dst": ["autogroup:self"],
      "users": ["autogroup:nonroot"]
    }
  ]
}

Verify SSH works:

# From Windows PowerShell or Mac Terminal
ssh jared@<tailscale-ip-or-magicDNS-name>

If using Tailscale SSH (tailscale set --ssh), no SSH keys needed -- Tailscale handles auth via WireGuard. Otherwise, set up keys:

Windows:

ssh-keygen -t ed25519 -C "windows-desktop"
type $env:USERPROFILE\.ssh\id_ed25519.pub | ssh jared@<tailscale-ip> "cat >> ~/.ssh/authorized_keys"

Mac:

ssh-keygen -t ed25519 -C "mac-desktop"
ssh-copy-id -i ~/.ssh/id_ed25519.pub jared@<tailscale-ip>

Part 2: Claude Desktop SSH Session (Windows + Mac)

Once Tailscale is connected:

  1. Open Claude Desktop on Windows or Mac
  2. Click the environment dropdown (before starting a session)
  3. Select + Add SSH connection
  4. Fill in:
    • Name: Dev Server (or whatever you like)
    • SSH Host: jared@<tailscale-ip> or jared@<magicDNS-hostname>
    • SSH Port: 22 (leave default)
    • Identity File:
      • Windows: C:\Users\<you>\.ssh\id_ed25519
      • Mac: ~/.ssh/id_ed25519
      • Or leave empty if using Tailscale SSH
  5. Click Save

Now select that connection from the environment dropdown and start a session. Claude runs on the Linux box with full access to files, tools, MCP servers, etc.

What works over SSH:

  • Permission modes (Ask, Auto accept edits, Plan mode)
  • Connectors (GitHub, Slack, Linear, etc.)
  • Plugins and MCP servers
  • @mention files with autocomplete
  • Skills and slash commands
  • Visual diff review, live app preview

What doesn't work over SSH:

  • Computer use (requires local Windows/macOS desktop)

Part 2b: VS Code Remote-SSH (Windows + Mac)

VS Code's built-in Remote-SSH extension uses the same Tailscale SSH connection.

Setup

  1. Install the Remote - SSH extension in VS Code (Microsoft first-party, ms-vscode-remote.remote-ssh)
  2. Ctrl+Shift+P (Windows) or Cmd+Shift+P (Mac) > Remote-SSH: Connect to Host...
  3. Enter: jared@<tailscale-ip>
  4. VS Code opens a full remote session -- terminal, file tree, extensions all run on the Linux box

Optional: Add to SSH config for one-click access

Add to ~/.ssh/config (Mac) or C:\Users\<you>\.ssh\config (Windows):

Host devbox
    HostName <tailscale-ip-or-magicDNS>
    User jared
    IdentityFile ~/.ssh/id_ed25519

Then just connect to devbox in the Remote-SSH dropdown.

What works:

  • Full terminal access
  • File editing with all VS Code extensions (run on remote)
  • Port forwarding (auto-forwards dev server ports)
  • Integrated Git
  • Claude Code extension (runs on remote, UI in local VS Code)

Part 3: Obsidian via SSHFS (Windows + Mac)

Windows: SSHFS-Win

Install (one-time):

Option A -- winget (recommended):

winget install WinFsp.WinFsp
winget install SSHFS-Win.SSHFS-Win

Option B -- manual:

  1. Install WinFsp from https://winfsp.dev/rel/
  2. Install SSHFS-Win from https://github.com/winfsp/sshfs-win/releases (x64)

Mount the wiki vault:

# Mount with SSH key auth, from root filesystem
net use W: \\sshfs.kr\jared@<tailscale-ip>\home\jared\workspace\wiki

UNC path syntax breakdown:

  • sshfs.kr = root path + SSH key auth (uses %USERPROFILE%\.ssh\id_rsa or id_ed25519)
  • sshfs.k = home-relative path + SSH key auth
  • sshfs.r = root path + password auth
  • sshfs = home-relative path + password auth

Using Windows Explorer:

  1. Open This PC > Map Network Drive
  2. Drive letter: W: (or whatever)
  3. Folder: \\sshfs.kr\jared@<tailscale-ip>\home\jared\workspace\wiki
  4. Check "Reconnect at sign-in"
  5. Click Finish

Keep connection alive -- apply ServerAliveInterval registry fix:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\WinFsp\Services\sshfs]
"CommandLine"="-oServerAliveInterval=30 -oServerAliveCountMax=3"

Open in Obsidian: Open folder as vault > navigate to W:\

Mac: macFUSE + sshfs

Install (one-time):

brew install macfuse
brew install gromgit/fuse/sshfs-mac

Note: macFUSE requires a kernel extension. After install, go to System Settings > Privacy & Security and approve the macFUSE extension. Reboot required.

Mount the wiki vault:

mkdir -p ~/wiki-mount
sshfs jared@<tailscale-ip>:/home/jared/workspace/wiki ~/wiki-mount \
  -o ServerAliveInterval=30 \
  -o reconnect \
  -o volname=wiki

Unmount:

umount ~/wiki-mount
# or: diskutil unmount ~/wiki-mount

Auto-mount at login -- create a Launch Agent at ~/Library/LaunchAgents/com.sshfs.wiki.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.sshfs.wiki</string>
    <key>ProgramArguments</key>
    <array>
        <string>/opt/homebrew/bin/sshfs</string>
        <string>jared@TAILSCALE_IP:/home/jared/workspace/wiki</string>
        <string>/Users/jared/wiki-mount</string>
        <string>-o</string><string>ServerAliveInterval=30</string>
        <string>-o</string><string>reconnect</string>
        <string>-o</string><string>volname=wiki</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>KeepAlive</key>
    <false/>
</dict>
</plist>

Replace TAILSCALE_IP with actual IP. Load with launchctl load ~/Library/LaunchAgents/com.sshfs.wiki.plist.

Open in Obsidian: Open folder as vault > navigate to ~/wiki-mount

Caveats (Both Platforms)

  • SSH keys must be passphrase-free for SSHFS key auth (or use ssh-agent)
  • First mount may prompt for credentials -- save them (Windows Credential Manager / macOS Keychain)
  • Large vaults may feel slightly slower than local due to network latency (Tailscale is fast but not zero)
  • Obsidian's file watcher may be slower over SSHFS -- it polls rather than using inotify
  • macFUSE kernel extension may need re-approval after macOS updates

Part 4: Startup Automation (Optional)

Windows

Create a batch script and place in shell:startup:

@echo off
REM Mount Linux wiki vault
net use W: \\sshfs.kr\jared@<tailscale-ip>\home\jared\workspace\wiki /persistent:yes 2>nul
echo Wiki vault mounted on W:

Or use Task Scheduler with condition "Start only if network connection is available."

Mac

Use the Launch Agent from Part 3 above, or a simple shell script in Login Items:

#!/bin/bash
sleep 5  # wait for Tailscale to connect
sshfs jared@<tailscale-ip>:/home/jared/workspace/wiki ~/wiki-mount \
  -o ServerAliveInterval=30 -o reconnect -o volname=wiki

Troubleshooting

SSHFS mount fails (Windows)

  • Verify SSH works first: ssh jared@<tailscale-ip> from PowerShell
  • Check WinFsp service is running: sc query WinFsp.Launcher
  • Try password-based mount first (\\sshfs\...) to isolate key issues
  • Ensure key is at %USERPROFILE%\.ssh\id_rsa or id_ed25519

SSHFS mount fails (Mac)

  • Verify macFUSE kernel extension is approved: System Settings > Privacy & Security
  • Test SSH manually first: ssh jared@<tailscale-ip>
  • Check mount point exists and is empty: ls ~/wiki-mount
  • If "mount_macfuse: mount point is itself on a macFUSE volume": unmount first

Claude Desktop SSH connection fails

  • Verify Tailscale is connected: tailscale status
  • Test SSH manually in terminal first
  • Check that Claude Code CLI is installed on the Linux box: claude --version

VS Code Remote-SSH fails

  • Same SSH troubleshooting as Claude Desktop
  • Check VS Code's Remote-SSH output log: View > Output > Remote-SSH
  • Ensure sshd is running on the Linux box: systemctl status ssh

Obsidian "vault not found" after reboot

  • SSHFS mount may not reconnect before Obsidian starts
  • Windows: use the startup script with a delay (timeout /t 10)
  • Mac: add sleep 5 before sshfs in your login script
  • Or just re-mount manually

Slow performance in Obsidian

  • Tailscale latency is usually <10ms on LAN, 20-50ms over internet
  • If vault is large (1000+ files), consider mounting only the wiki subfolder
  • Disable Obsidian plugins that do heavy file scanning (e.g., search indexing)

Summary: One Mechanism, All Apps

App Protocol Windows Mac
Claude Desktop SSH session Built-in env dropdown Built-in env dropdown
VS Code Remote-SSH Remote-SSH extension Remote-SSH extension
Obsidian SSHFS mount WinFsp + SSHFS-Win macFUSE + sshfs-mac

All three use the same Tailscale IP and SSH key. One mechanism across everything.


Security Notes

  • Tailscale encrypts all traffic with WireGuard -- no data in the clear
  • No ports exposed to the public internet
  • If using Tailscale SSH: auth handled by Tailscale identity, no SSH keys to manage
  • If using SSH keys: ed25519 recommended, stored in Windows Credential Manager / macOS Keychain
  • Tailscale ACLs control who can reach which machines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment