I am trying to copy files from my local drive to Solaris 11 host using WinSCP and it is failing with the below error message:
Cannot initialize SFTP protocol. Is the host running an SFTP server?
I also tried SFTPing from Tectia tool and it fails with
Upon checking the logs on the server, I could see that the password is accepted for my user ID and no error message is being captured in the logs.
The sshd_config file has below entries and I suspect the presence of -m 117 for the Subsystem is the cause of the issue. When I look at the man pages I only see -d and -u as the valid options.
So, is "-m" an invalid option and is this misconfiguration (-m option) the cause of the issue?
Subsystem sftp internal-sftp -m 117
Match Group sftponly
ChrootDirectory %h
ForceCommand internal-sftp
EDIT 1:
Figured out that -m is a valid option on RHEL servers (man pages of sftp-server for more details).
So, it was a misconfiguration on our Solaris hosts. Removing it made SFTP connection successful.
chroot
to exist (when user in sftponly group) ?