So i have created a systemd service file to make sure that there is a reverse ssh tunnel created persistently upon reboot or re-connection.
But i have been recently facing some problems with it:
I am unable to reverse ssh into the pi from the server from time to time. when i run
on the server i can see that there is an ssh connection from the pi's end to the respective port that i had mentioned and that the port is listening too. but still i am not able to access the pi from the server. can anyone please help me with the situation?
Code: Select all
My remote.service file:
Description=Reverse SSH Service
ExecStart=/usr/bin/ssh -NTC -o ServerAliveInterval=60 -o ExitOnForwardFailure=yes -o StrictHostKeyChecking=no -R 6001:localhost:22 -i <location of the key file>/xxx.pem [email protected]_ip