[SOLVED] SFTP connections freeze after being iddle

Archived topics about LMDE 1 and LMDE 2
Locked
HTD

[SOLVED] SFTP connections freeze after being iddle

Post by HTD »

OK. Let me rephrase it:

Please help me with sftp connections. Nautilus can handle remote filesystems via SSH/SFTP. I used it since very first version in GNOME. It's the main reason I use Linux, and main reason for GNOME (or KDE).

Until about couple a weeks ago it looked likie this:
I connect to remote server with Nautilus (using bookmarks for frequently userd servers). The directory listing appears immediately, and whole thing works almost as fast as local filesystem. No single problem ever here.

THEN I WRITE CODE OR POST FOR 5 MINUTES OR MORE. WHEN I GET BACK TO NAUTILUS - IT'S FROZEN. I HAVE TO DISCONNECT REMOTE FILESYSTEM AND RECONNECT IT AGAIN.

Why such a strange thing happens? It's very annoying. I use remote filesystem at work, I need directories opened in tabs to organize my work and update files quickly. No, it's not commiting my changes, I really need to manualy check files, upload and download. So Nautilus was the best choice for years.

What happened? It looks like every SFTP connection has a hidden iddle time and it's disconnected without notifying Nautilus it did. Is it a magic setting to block disconnecting? I don't want my connections to be shut down ever! Only manually or on system shutdown.

Now even weirder part. It works good with KDE and Dolphin. No disconnecting. But wait, it worked in GNOME. Please, help.

Recently I tried GNOME 3. Same thing. In KDE/Dolphin connection stay, in GNOME they freeze after about 5 minutes of being idle. I tried to upload a huge directory with Nautilus. It worked for 15 minutes. It doesn't break when I use connection. It does break when it's not used. It looks like a timeout, and if it's a timeout, it should be configurable, but where?

I've added "ConnectTimeout 0" to /etc/ssh/ssh_config - but it didn't help.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
HTD

Re: SFTP connections freeze after 5 minutes of being iddle

Post by HTD »

Why do I always have to reply myself? :)

Here's what I've done, I'm not sure which one has helped:

Added a line to /etc/ssh/ssh_config: "ServerAliveInterval 3".
Used gconf-editor to change /desktop/gnome/session/idle_delay to to 65535.

Restarted /etc/init.d/network-manager , /etc/init.d/ssh, but it didn't help.

I rebooted, and now SFTP in Nautilus works as expected.

First I found this: http://ubuntuforums.org/showthread.php?t=1010463
But it was suspicious that gconf-editor started as root didn't show /desktop/gnome/session key at all.

Then I found this:
http://embraceubuntu.com/2006/02/03/kee ... ons-alive/
and I think this is it.
randy112

Re: [SOLVED] SFTP connections freeze after being iddle

Post by randy112 »

Thanks for the feedback, my problem is pretty similar to yours. It's cool that you had the courtesy to explain to everyone how you fixed the issue, by yourself, ironically.
Habitual

Re: SFTP connections freeze after 5 minutes of being iddle

Post by Habitual »

HTD wrote:Why do I always have to reply myself? :)....
Sometimes, you just need to write stuff out.
Props for fixing it yourself.
Locked

Return to “LMDE Archive”