On Tue, Oct 12, 2021 at 8:35 AM Shai Roemi <[email protected]> wrote:
> Hello, > > I'm re-submitting this question, as my previous attempt had formatting issues. > > I think your previous attempt may have been better - this seems to be light gray on white background for me, and almost impossible to read :-). > I’m deploying guacamole on docker containers on Linux, and I’ve noticed that > when I leave an SSH session idle for about 10 minutes (perhaps slightly > less), any SFTP action fails. > > For example, when I try to view files in a directory (say /home), I get > the error "Unable to read file /home” in the `guacd` logs, and the result is > just an empty list of files in the file browser. > > After looking at the code, it seems this error occurs when the > `libssh2_sftp_open` returns NULL, and according to the docs at > https://www.libssh2.org/libssh2_sftp_open_ex.html">https://www.libssh2.org/libssh2_sftp_open_ex.html > NULL is returned “on failure”. > > Note that the SSH session is still very functional and working when the SFTP > session fails to respond. When I reconnect the session, SFTP works fine. > > I suspect this might be due to lack of SFTP keep-alives, but I could not find > any guacamole configuration to allow this. I did attempt using the > ssh-keep-alive > > When you use SFTP with SSH, the SFTP connection uses the existing SSH connection, including all of the options you set. So, if you set SSH to do keep-alives, SFTP will also do keep-alives. If you don't have it configured for SSH, SFTP will also not do it. -Nick >
