I am following a tutorial on how to run a reverse ssh tunnel which is found at http://wiki.fabelier.org/index.php?title=Permanent_Reverse_SSH_Tunneling Issue I am having is when I run the tunneling.sh script:
#!/bin/sh
a=`ps -ef | grep 19999 | grep -v grep`
if [ ! "$a" ]; then
ssh -fN -R 19999:localhost:22 <middle-usename>@<middle-hostname>
fi
I receive this error:
tunnel2.sh: 2: tunnel2.sh: a: not found
EDIT:
I changed shebang to #!/bin/bash
now I get this error:
tunnel2.sh: 2: tunnel2.sh: pi: not found
Don't specify #!/bin/sh in your "shebang" line if you're going to use bash features. If you want bash, ask for bash.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With