Answer the question
In order to leave comments, you need to log in
Why when you don’t work for a long time or in some places you can’t connect to ssh?
I have such a problem, the server itself is located on a virtual machine via bitrixvm. The first time after the connection everything works fine. After some time, when the site left in the browser, it stops working and ssh writes
[email protected]:~$ ssh [email protected]
ssh: connect to host 192.168.0.103 port 22: No route to host
[email protected]:~$ sudo netstat -tpln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 3386/sshd
Answer the question
In order to leave comments, you need to log in
Use not SSH, but Mosh.
This is such a thing that establishes the initial connection via SSH, and then works itself.
Since Mosh has a connection not based on TCP like SSH, but via UDP, the connection does not break for days. Even if you move, for example, with a 3G / 4G router in an area where at times there are gaps in mobile Internet coverage.
Mosh also knows how to predict, that is, it gives you an answer before it actually receives it from the server (when it receives a real answer, it will correct its prediction).
As a result, working on slow/poor quality links with Mosh is much more convenient than with SSH.
Visually and functionally, the session looks the same as with SSH.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question