2

I connect to a remote server using Nautilus (No, I don't like FileZilla). But after a bit of an idle moment, like 5 minutes it does not allows me to access again the remote location.

Even If I do get it sorted just mounting the server again, it's very annoying, as you can imagine, because I need to do that every 5 minutes.

I've read here a similar issue, but it's an old post and it does not provides a working solution for Ubuntu Focal Fossa.

I've read this other question as well, but I'm not sure the answer applies to my problem.

Finally, I've read this post where there seems to be a problem, but not any solution or workaround yet?

There seems to be a suggested workaround here, but I'm not sure how to do that either, or if it applies to this issue (I assumed that given than Mint and Ubuntu are Debian based systems, a Mint solution could work for Ubuntu?).

Rosamunda
  • 781

1 Answers1

1

This isn't something your client (Nautilus) can change. Instead, the server you are connecting to is closing the connection after a certain period of "inactive" connection time.

If you own the server and can make settings there, try editing /etc/ssh/sshd_config and setting the following values:

ClientAliveInterval 1200
ClientAliveCountMax 3

ClientAliveInterval sets the time in seconds after which the server checks if the client is still connected. ClientAliveCountMax sets how often it does that before it closes the connection.

So for a timeout of 1 hour, you need:
1 hour = 60 minutes = 3600 seconds, so 3 times 1200 seconds (the values above).

Also, see this article for further information on these settings.

bkis
  • 176
  • Thanks for the help bkis! Could it be a security issue changing the alive interval to a couple of hours? Again, thanks for your answer! – Rosamunda Oct 13 '20 at 14:21
  • 1
    Well, yes. The reason the server closes the connection certainly is a security measure. But it will still do that, just later. The short default timeout is just a, well default. Because why should it wait longer if it's not needed? :) – bkis Oct 13 '20 at 15:29
  • Very kind. I've managed to change it to one hour with your help :) Thanks! – Rosamunda Oct 13 '20 at 15:45
  • You are most welcome! – bkis Oct 13 '20 at 16:18