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

enter image description here

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


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.

  • do directory to chroot to exist (when user in sftponly group) ?
    – Archemar
    Commented Mar 9, 2022 at 13:31
  • Yes, directory exists. Moreover, account that I am using to login via WinSCP isn't part of the sftponly group.
    – Akshay
    Commented Mar 10, 2022 at 10:43

1 Answer 1


Yes, as per documentation of Solaris there is no -m option. I will recommend you to remove this option and restart sshd daemon on Solaris machine. Do not forget to keep open ssh session to the Solaris so you can correct error if sshd daemon do not want to restart.

  • Also it's quite possible that -u 117 can replace the intended use of -m 117 (though 007 is probably better than 117 or created directories might not be usable, unless that's the intent).
    – A.B
    Commented Mar 9, 2022 at 12:59
  • @A.B, there is such possibility, but I prefer not to speculate about :D Commented Mar 9, 2022 at 13:09
  • 1
    @RomeoNinov Thank you. Post removing the -m 117 entry from the config file, SFTP connection is going through. So, was it just incorrect option in the file blocking all incoming SFTP connections?
    – Akshay
    Commented Mar 9, 2022 at 14:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .