I can create ssh connection from the command line with this command(without password):
ssh -R 9900:localhost:22 user@host
I need to run this command whenever the system reboots, so I put it in a bash script and added this line to crontab:
@reboot /home/me/script.sh > output
But in output I get this error: ssh: Could not resolve hostname myhost: Name or service not known
I think it's because this script starts before internet connection is established. I put a
sleep(180) before the ssh command, but it didn't help. Any suggestion?