You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
837 B
19 lines
837 B
1 year ago
|
# 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
|
||
|
```
|