Last active
December 29, 2021 14:24
-
-
Save josephphyo/0676feb282a831d79db35c4b3edbcd2d to your computer and use it in GitHub Desktop.
Jump Private Server Via Bastion Host Single Hop (Linux or Mac Host)
This file contains hidden or 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
<< Add Config to sshd config - ~/.ssh/config >> | |
# vim ~/.ssh/config | |
===================================== | |
### Bastion Host Jump Config | |
## Private Server | |
Host private-server-1 | |
HostName 192.168.1.2 | |
User ubuntu | |
IdentityFile /path/private_key.pem | |
ProxyJump bastion | |
Host private-server-2 | |
HostName 192.168.1.3 | |
User ubuntu | |
IdentityFile /path/private_key.pem | |
ProxyJump bastion | |
## Bastion Server | |
Host bastion | |
HostName 192.168.1.1 | |
User ubuntu | |
IdentityFile /path/bastion_key.pem | |
===================================== | |
<< Login Commad >> | |
# ssh private-server-1 | |
# ssh private-server-2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment