#sysadmin #terminal #tools

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:

1export PRIVATE_KEY=conf/ssh/id_rsa
2chmod g-r $PRIVATE_KEY
3chmod o-r $PRIVATE_KEY

Setting up the tunnel can then be done as follows:

1export LOCAL=
2export REMOTE=
3export DESTINATION=user@remote-server.com
4export PRIVATE_KEY=conf/ssh/id_rsa