Add 'cloudflare-ssh-config.md'

main
Adyanth H 1 year ago
parent 8e69608fdb
commit 0cf0288886
  1. 18
      cloudflare-ssh-config.md

@ -0,0 +1,18 @@
# Cloudflare SSH client config
Add this to ~/.ssh/config. Needs cloudflared installed in `PATH`. If on Windows, you need to specify the complete location to the cloudflared executable. Ex. `C:\Scripts\cloudflared.exe` instead of `cloudflared` in the below config.
```
Match host git-ssh.adyanth.site
ProxyCommand cloudflared access ssh --hostname git-ssh.adyanth.site
```
Note: Since I need split tunnelling, I have the below configuration, so that when I am in the local network, I connect directly, without going to the internet and back. The cloudflared section only matches if the ping to the local DNS name fails.
```
Match host git-ssh.adyanth.site !exec "ping -n 1 git-ssh.adyanth.lan"
ProxyCommand cloudflared access ssh --hostname git-ssh.adyanth.site
Host git-ssh.adyanth.site
HostName git-ssh.adyanth.lan
```
Loading…
Cancel
Save