Last active
October 12, 2017 01:59
-
-
Save Matrixbirds/80a11b500fe1c82acf3a382206640040 to your computer and use it in GitHub Desktop.
ssh tunnel proxy rds连接方法
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
| ssh -f -L <local-port>:<rds-address>:<rds-port> <jump_server> -N # run in background | |
| mysql -u<rds-username> -P <local-port> --host='127.0.0.1' -p | |
| psql -h 127.0.0.1 -p <local-port> -U <username> <db_name> # after entered input your password | |
| ## lsof 列出建立TCP链接到 xx port的 相关进程 | |
| lsof -n -i4TCP:<portno> | grep <process-id> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment