Skip to content

Instantly share code, notes, and snippets.

@sugatoray
Last active October 25, 2021 02:32
Show Gist options
  • Save sugatoray/5b07512c93853204321dac37ae7076af to your computer and use it in GitHub Desktop.
Save sugatoray/5b07512c93853204321dac37ae7076af to your computer and use it in GitHub Desktop.
SSH Tips and Tricks
@sugatoray
Copy link
Author

# Jump box with public IP address
Host jump-box
    HostName 52.179.157.97
    User sana
    IdentityFile ~/.ssh/jumpbox

# Target machine with private IP address
Host target-box
    HostName <IP address of target>
    User sana
    IdentityFile ~/.ssh/target
    ProxyCommand ssh -q -W %h:%p jump-box

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment