Issue with SFTP configuration code in installation script causing connection problems in FinalShell

During the installation process, this part of the code causes the folder to fail to load and repeatedly disconnect when using the FinalShell SSH tool.

# Enable SFTP subsystem for SSH
sftp_subsys_enabled=$(grep -iE "^#?.*subsystem.+(sftp )?sftp-server" /etc/ssh/sshd_config)
if [ -n "$sftp_subsys_enabled" ]; then
	sed -i -E "s/^#?.*Subsystem.+(sftp )?sftp-server/Subsystem sftp internal-sftp/g" /etc/ssh/sshd_config
fi

After adjusting to the following format, there is no problem. Why is that?

# Enable SFTP subsystem for SSH
sftp_subsys_enabled=$(grep -iE "^#?.*subsystem.+(sftp )?sftp" /etc/ssh/sshd_config)
if [ -n "$sftp_subsys_enabled" ]; then
	sed -i -E "s/^#?.*Subsystem.+(sftp )?sftp/Subsystem sftp internal-sftp/g" /etc/ssh/sshd_config
fi

node_v=“20” The latest version is already 24, so why hasn’t it been updated in the installer?

slow to update things round here currently and issues when they do update. If you are just getting started with hestia ya might wanna look around here first. Hopefully it will get better. Such is the ebb and flow of open source software. I love it and appreciate all the work that is done. Couldnt have made it without them.

Regarding the ssh I had that issue after a previous update and was able to get it sorted out. sahsanu helped me out. a search on sftp subsystem should help find it

Thank you! I just wanted to point out that there is this issue. I’ve already fixed it. I wish you a pleasant experience using HestiaCP!

I’m not sure what your previous setup was, but Hestia needs a clean OS install. By default, the Subsystem config is:

Subsystem       sftp    /usr/lib/openssh/sftp-server

The Hestia installer updates this to:

Subsystem sftp internal-sftp

If you had already modified sshd_config, that could be the cause of the issue. I don’t consider this to be a bug.

It’s possible that the Hestia tools using Node.js haven’t been tested against a major release yet.

@jperkins Keep in mind that this issue is not related to that one, it is related to v-add-sys-sftp-jail and it’s fixed in Hestia 1.9.5. :wink: