Created
November 9, 2023 21:27
-
-
Save st3b1t/4911cec8587cf5a794f290ce8b2778b3 to your computer and use it in GitHub Desktop.
script to create a ssh tunnel to your bitcoin node
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
#!/bin/sh | |
# | |
# script to create a ssh tunnel to your bitcoin node | |
# and expose in localhost temporary port of bitcoin core | |
# | |
#user to access bitcoin node | |
USERNODE=user-ssh-node | |
#ip or hostname of bitcoin node | |
HOSTNODE=bitcoind-host | |
#ssh port(usually 22) | |
PORTNODE=port-ssh-node | |
#bitcoin node access ssh key | |
SSHKEYNODE=~/.ssh/id_rsa_node | |
BIND1='127.0.0.1' | |
#userful for docker/docker-compose | |
BIND2='172.17.0.1' | |
ssh -fN -i $SSHKEYNODE -l $USERNODE -p $PORTNODE -L $BIND1:8332:localhost:8332 $HOSTNODE | |
ssh -fN -i $SSHKEYNODE -l $USERNODE -p $PORTNODE -L $BIND2:8332:localhost:8332 $HOSTNODE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment