Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

zbalogh

unable to start SFTP with WinSCP

I had this issue and it caused incorrect permission on /etc/passwd file. it was 600 and I changed it to 644 and then WinSCP via SFTP was working again.
martin

Re: Cannot initialize SFTP protocol. (SOLVED!)

edman wrote:

I have been trying to get winscp to connect to a remote sftp site, but kept encountering the dreaded: Cannot initialize SFTP protocol. Is the host running a SFTP server? after authenticating.

Oddly Filezilla worked fine, WinSCP Gui and command line both failed after authentication.

After googling and searching to forums, someone suggested to set the SFTP protocol version to a lower number (on the gui, advanced options->sftp->preferred sftp protocol version), once i set that to 4, the gui connected.

But i needed the commandline to do so also, this is the syntax:

open sftp://username:password@remotehost -rawsettings SFTPMaxVersion=4

everything is hunkydory now.

Thanks for sharing this. I have added your solution to the documentation:
https://winscp.net/eng/docs/message_cannot_initialize_sftp_protocol
edman

Cannot initialize SFTP protocol. (SOLVED!)

I have been trying to get winscp to connect to a remote sftp site, but kept encountering the dreaded: Cannot initialize SFTP protocol. Is the host running a SFTP server? after authenticating.

Oddly Filezilla worked fine, WinSCP Gui and command line both failed after authentication.

After googling and searching to forums, someone suggested to set the SFTP protocol version to a lower number (on the gui, advanced options->sftp->preferred sftp protocol version), once i set that to 4, the gui connected.

But i needed the commandline to do so also, this is the syntax:

open sftp://username:password@remotehost -rawsettings SFTPMaxVersion=4

everything is hunkydory now.
Guest

Re: SFTP login failure

Thank you! That was definitely an oversite on my part -- everything is working great now.

Thanks again for such a useful program, *and* fast support.
martin

Re: SFTP login failure

There maybe difference with SSH protocol version you're using with WinSCP and on command line. Please check this. From the log I suppose that with WinSCP, you're using SSH1, try SSH2 instead.
Guest

SFTP login failure

Hi,

I am having problems logging into SFTP on my main server. I can successfully login from the command line from a test server here, but not with WinSCP. Yes, I am using the same username and password. I turned logging on, and here is the output:

[snip]

. Sent username "myusername"
. Session password prompt (myusername@69.x.x.x's password: )
. Using stored password.
. Sending password with camouflage packets
. Sent password
. Authentication successful
. Started session
. --------------------------------------------------------------------------
. Using SFTP protocol.
. Doing startup conversation with host.
> Type: SSH_FXP_INIT, Size: 5, Number: -1
! bash: line 3: exec: sftp-server: not found
. Server sent command exit status 127
* (ESshFatal) Cannot initialize SFTP protocol. Is the host running a SFTP server?
* Connection has been unexpectedly closed. Server sent command exit status 127.

[/snip]

Thanks in advance!