Skip to content

Instantly share code, notes, and snippets.

@gwsu2008
Last active July 9, 2018 21:43
Show Gist options
  • Save gwsu2008/902f20b44fb2de9a33a5156807e89940 to your computer and use it in GitHub Desktop.
Save gwsu2008/902f20b44fb2de9a33a5156807e89940 to your computer and use it in GitHub Desktop.
Useful ssh commands
#!/bin/bash +x
# ssh tunnel proxy
ssh -i ~/.ssh/int.pem -o 'ProxyCommand=ssh -i ~/.ssh/ci.pem centos@10.150.1.1 -W %h:%p 2>/dev/null' hadoop@10.1.0.1
ssh -o ProxyCommand='ssh -q -W %h:%p -i ~/.ssh/jumpbox-dev.pem ec2-user@jumpbox-host' -i ~/.ssh/emr-proteus-dev.pem hadoop@destination_host
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment