SFTP login failure

Advertisement

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!

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,430
Location:
Prague, Czechia

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.

Reply with quote

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.

Reply with quote

edman
Guest

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.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,430
Location:
Prague, Czechia

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

Reply with quote

zbalogh
Guest

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.

Reply with quote

Advertisement

You can post new topics in this forum