Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSH ServerAliveInterval ignored by Cyberduck – idle connection timeout prevents editing a file in external editor #15895

Open
saudepp opened this issue Apr 28, 2024 · 2 comments

Comments

@saudepp
Copy link

saudepp commented Apr 28, 2024

It seems Cyberduck ignores directives "ServerAliveInterval" set in:
~/.ssh/config

ServerAliveInterval 120
ServerAliveCountMax 10

If I e.g. connect via SFTP to a remote server and open a file in an external editor, I want to edit this file and after some time save it remotely.
It seems that after around 10 minutes, the SFTP connection in Cyberduck is lost, so the ServerAliveInterval of 120 seconds (intended to refresh the connection to the remote server) seems to be ignored.

When I then want to save the file in the external editor, the status in Cyberduck is "{file name} preparing (overwrite)" and a spinning wheel, see screenshot:
Bildschirmfoto 2024-04-28 um 11 59 43

Then the connection to the server is retried after 10 seconds (as defined in the Cyberduck connection setting), but fails in the end with a dialogue, see screenshot:

Bildschirmfoto 2024-04-28 um 12 00 26

When I click on Cancel ("Abbrechen"), Cyberduck reconnects to the server just fine. I have to reopen the file in the external editor, and then save my changes ...

I don't post my verbose loge file here, due to sensitive information contained.

macOS 14.4.1
Cyberduck 8.8.2

@tatze96
Copy link

tatze96 commented May 15, 2024

Please send the mentioned log file with the ticket reference GH-15895 to support@cyberduck.io for further investigation.

@AliveDevil
Copy link
Contributor

Cyberduck by default sends out keepalive@openssh.com-requests, configurable with

ssh.heartbeat.provider=keep-alive

with a default value of

ssh.heartbeat.seconds=60

Cyberduck ignores the ServerAliveInterval.

Tested this against a local OpenSSH server (on Debian), with configuration

$ sudo sshd -T | grep -i alive
clientaliveinterval 120
clientalivecountmax 3
tcpkeepalive yes

I don't see any issue with having TextEdit on a text file open for extended periods of time (had it open, not doing anything for 14 minutes:

2024-05-17 12:59:14,977 [sshj-PacketReader-manage.lab.xc/172.19.216.6:22-1715942888984] DEBUG net.schmizz.sshj.sftp.PacketReader - Received STATUS packet
2024-05-17 12:59:14,977 [sshj-PacketReader-manage.lab.xc/172.19.216.6:22-1715942888984] DEBUG net.schmizz.concurrent.Promise - Setting <<sftp / 82>> to `Buffer [rpos=5, wpos=24, size=24]`
2024-05-17 13:03:15,094 [sshj-Reader-manage.lab.xc/172.19.216.6:22-1715942878957] DEBUG net.schmizz.sshj.connection.channel.direct.SessionChannel - Got chan request for `keepalive@openssh.com`
2024-05-17 13:07:15,220 [sshj-Reader-manage.lab.xc/172.19.216.6:22-1715942878957] DEBUG net.schmizz.sshj.connection.channel.direct.SessionChannel - Got chan request for `keepalive@openssh.com`
2024-05-17 13:11:15,345 [sshj-Reader-manage.lab.xc/172.19.216.6:22-1715942878957] DEBUG net.schmizz.sshj.connection.channel.direct.SessionChannel - Got chan request for `keepalive@openssh.com`
2024-05-17 13:13:42,819 [Thread-92] DEBUG net.schmizz.sshj.connection.channel.Window$Remote - Consuming by 42 down to 2094803

@saudepp saudepp closed this as not planned Won't fix, can't repro, duplicate, stale May 17, 2024
@saudepp saudepp reopened this May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants