Skip to content

Instantly share code, notes, and snippets.

@GitSumito
Last active May 18, 2018 11:42
Show Gist options
  • Save GitSumito/5e6475c06416cb06cbca32f76b7cde33 to your computer and use it in GitHub Desktop.
Save GitSumito/5e6475c06416cb06cbca32f76b7cde33 to your computer and use it in GitHub Desktop.
一歩先のDBやserverへ接続する ref: https://qiita.com/S-T/items/1ab8537ad08d0100e94d
ssh -f -N -L 13306:dbserver:3306 gatewayユーザー名@bastion
mysql -udbuser -h 127.0.0.1 -P 13306 -p
Host dbserver
ProxyCommand ssh bastion -i ~/.ssh/key.pem -W %h:%p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment