Created
July 10, 2024 04:26
-
-
Save initcron/138b36bac923836d340d5e204a02d916 to your computer and use it in GitHub Desktop.
Connect to a server in private network (Private subnets of VPC) ~/.ssh/config
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
Host public | |
Hostname x.x.x.x | |
User ubuntu | |
IdentityFile ~/.ssh/path_to_key1.pem | |
Host private | |
HostName y.y.y.y | |
User ec2-user | |
ProxyCommand ssh -W %h:%p public | |
IdentityFile ~/.ssh/path_to_key2.pem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment