Skip to content

Instantly share code, notes, and snippets.

@v-thomp4
Created June 9, 2020 08:07
Show Gist options
  • Save v-thomp4/32e918e9a6f2b9483cd00cbd78c2a51b to your computer and use it in GitHub Desktop.
Save v-thomp4/32e918e9a6f2b9483cd00cbd78c2a51b to your computer and use it in GitHub Desktop.
ssh config
~/.ssh/config
Match Originalhost server-a Exec "ifconfig | grep 192.168.1"
Hostname 192.168.1.100
User foo
Port 2222
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Host server-a
HostName ngrok.example.com
User bar
Port 33333
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment