Just a note for myself because I always forget the syntax of setting up an SSH tunnel:
If you want to use a custom keypair, you first need to ensure they have the proper permissions:
export PRIVATE_KEY=conf/ssh/id_rsachmod g-r $PRIVATE_KEYchmod o-r $PRIVATE_KEY
Setting up the tunnel can then be done as follows:
export LOCAL=127.0.0.1:3306export REMOTE=127.0.0.1:3306export DESTINATION=user@remote-server.comexport PRIVATE_KEY=conf/ssh/id_rsassh -L $LOCAL:$REMOTE $DESTINATION -N -i $PRIVATE_KEY