File manager unknown error

SSH server in Debian now support in config Include /etc/ssh/sshd_config.d/*.conf and if I use different port in my own file (override base config) in sshd_config.d dir this file is ignored by filegator

 if ( !isset($_SESSION['SFTP_PORT']) ) {
            if( preg_match('/^\s*Port\s+(\d+)$/im', file_get_contents('/etc/ssh/sshd_config'), $matches) ) {
                $_SESSION['SFTP_PORT'] = $matches[1] ?? 22;
            } else {
                $_SESSION['SFTP_PORT'] = 22;

Maybe it will help someone

Unless we scan trough all the files located in /etc/ssh/sshd_config/conf.d it is not possible to find to find the correct port then…

I use custom port as well. In the alternative, I why not have a global for $SSH_Port in hestia.conf and secure it that way by sed?

Testing now

sshd -T | grep '^port'| cut -d ' ' -f2

If I run it via CLI it also returns the port fine

1 Like

Should work fine

1 Like