36 lines
1.2 KiB
Plaintext
36 lines
1.2 KiB
Plaintext
# SSH Config for Termux with mDNS/Tailscale resolution
|
|
# Copy relevant sections to ~/.ssh/config
|
|
|
|
Host *
|
|
IdentityFile ~/.ssh/id_ed25519
|
|
IdentitiesOnly yes
|
|
ServerAliveInterval 60
|
|
ServerAliveCountMax 3
|
|
ConnectTimeout 10
|
|
|
|
# === mDNS (.local) - Dynamic resolution ===
|
|
Host *.local
|
|
User <your-user>
|
|
ProxyCommand ~/.local/bin/ssh-mdns-proxy %h %p
|
|
|
|
# === Short hostnames -> mDNS first, then Tailscale ===
|
|
# HostKeyAlias pins host-key verification to the canonical name, so that a short
|
|
# alias and the full name share ONE known_hosts entry. Without it, `ssh alias`
|
|
# checks the key under the alias and fails when only the canonical name is known
|
|
# (or when a stale alias entry lingers after a reinstall).
|
|
Host <host-1-canonical> <host-1-alias>
|
|
User <your-user>
|
|
HostKeyAlias <host-1-canonical>
|
|
ProxyCommand ~/.local/bin/ssh-mdns-proxy %h %p
|
|
|
|
Host <host-2-canonical> <host-2-alias>
|
|
User <your-user>
|
|
HostKeyAlias <host-2-canonical>
|
|
ProxyCommand ~/.local/bin/ssh-mdns-proxy %h %p
|
|
|
|
# === ProxyJump (hosts without Tailscale, via jump host) ===
|
|
# Host <lan-only-host>
|
|
# HostName <lan-only-host>.local
|
|
# User <user>
|
|
# ProxyJump <jump-host>
|