The author shares an SSH configuration trick that automatically routes connections through a bastion host only when local DNS resolution fails, such as when away from home. By leveraging the Match directive with a shell command and ProxyJump, they eliminate the need for manual proxy switching. The post also briefly discusses potential pitfalls when applying this method to .local domains.
Background
SSH bastion hosts are commonly used to securely access private networks from external locations, but managing connection routing manually can be cumbersome. This tip automates the fallback mechanism using built-in OpenSSH directives.
- Source
- Lobsters
- Published
- Jul 21, 2026 at 10:23 AM
- Score
- 5.0 / 10