Rainman_34 Posted January 6, 2017 Share Posted January 6, 2017 So it seems I am missing something here and I can't seem to figure out what I am doing wrong so any help here would be greatly appreciated. I have a Raspberry Pi 3 running Raspbian Jessie Lite and I have a VPS that I want it to automatically connect to. I am having a couple of issues and the first one is when I issue the following command nothing happens and by that I mean a netstat -antp still shows the port closed on the VPS. For security purposes I in the example I am using random port numbers but when I give the command I am using the actual ports that my ssh is running on. autossh -i secretkey.pem -f -N -M 0 1111:localhost:4444 user@VPS -p 5555 -o "ServerAliveInterval 360" -o "ServerAliveCountMax 5" When I issue the following command though autossh works and makes an ssh connection but because I have removed the -f flag it opens a connection in my terminal and once I exit the terminal it closes the connection and the port on my VPS autossh -i secretkey.pem -M 0 1111:localhost:4444 user@VPS -p 5555 -o "ServerAliveInterval 360" -o "ServerAliveCountMax 5" The next issue is that when I put the same command from above into a cronjob with @reboot no connection is made to the VPS when I reboot the Pi. Any help with this is greatly appreciated. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.