How do you reach private servers over SSH through a bastion in one command?
IntermediateScenarioSecurity: Firewalls, SGs, NACLs & VPN
Answer
Situation read → ProxyJump chains SSH connections transparently.
What I'd do →
- Use
ssh -J [email protected] [email protected] - Persist in
~/.ssh/config:Host private-*withProxyJump bastion - Use agent forwarding carefully, prefer ProxyJump so keys never touch the bastion
- Port forward a DB:
ssh -L 5432:db.internal:5432 bastion - Audit with SSH logs
Why → ProxyJump keeps your private key on your laptop.
Interview tip → Say SSM port forwarding replaces the bastion entirely.
More on Security: Firewalls, SGs, NACLs & VPN
Security group versus NACL: explain the differences.BeginnerHow do you let only your office IP SSH into a server?BeginnerWhat does it mean that a security group can reference another security group?BeginnerStateful versus stateless firewalls: what is the practical difference?BeginnerWhat is a WAF and where do you place it?BeginnerWhat is the difference between a site-to-site VPN and a client VPN?Beginner