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
  • 831

2 Answers2

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
0

I prefer using crontab(my computer not in the server...), works on Ubuntu 22.04.4 and GNOME nautilus 42.6

this works only when there is one o more connections

example:

* *     * * *   myuser   ls /run/user/1000/gvfs/sftp* &>/dev/null