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