Created
October 31, 2023 07:55
-
-
Save febridev/951ffd0461b521d2e09d480826e6881d to your computer and use it in GitHub Desktop.
This file contains 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
IP=$1 | |
LPORT=$2 | |
RPORT=$2 | |
ps aux | grep id_rsa | grep ${LPORT} | awk '{print $2}' | tail -1 | xargs kill -9 | |
ssh -i ~/.ssh/id_rsa -o ExitOnForwardFailure=yes -f -N -L ${LPORT}:${IP}:${RPORT} <userssh>@<ipjumphost> | |
pgcli --host 127.0.0.1 --port $LPORT --username <userdatabase> --dbname STG_FINANCING |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment