2

I am new to this community , I am working on my iot project in which my microcontroller is working as a server, taking data and executing request. My client is end device (mobile,tablet) and I am connecting through SSH.

The problem appears if suddenly my internet gets off - the ssh session breaks off, and again I have to reconfigure it using this command:

ssh -o TCPKeepAlive=yes -R 80:192.145.47.33:80 [email protected]

And in a similar manner if the power of the server (microcontroller) gets trip off, then I get the similar situation. I want that session get automatically configured without manual intervention.

0

1 Answer 1

7

AutoSSH is the tool you want to use for this. It starts the SSH connection and restarts it in case it breaks up.

1
  • 4
    And on top of that I would suggest using tmux or screen in your session so that you can recover your original shell when you reconnect.
    – Kate
    Jul 26, 2020 at 11:02

Not the answer you're looking for? Browse other questions tagged .