Created
November 21, 2018 22:29
-
-
Save lukechampine/fc9abbce332a79935ad391d1c35334b4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ssh config to connect to a host via local network if available. | |
# | |
# For example, if the host is 192.168.1.10 on your local network, | |
# first run ssh-keyscan 192.168.1.10 to see what keys are available, | |
# then substitute that key for your_host_key (-t selects the key type). | |
Match exec "ssh-keyscan -T 1 -t ed25519 local.ip.for.host 2>/dev/null | grep -F your_host_key" host yourhostname | |
Hostname local.ip.for.host | |
Port 22 | |
Host yourhostname | |
Hostname external.ip.for.host | |
Port 1234 | |
# Additional shared config options here... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment