Topic "SFTP login failure"

Author Message
Guest




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!
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
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.
_________________
Martin Prikryl
Guest




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
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
For details about error message "Cannot initialize SFTP protocol. Is the host running a SFTP server?" see:
http://winscp.net/eng/docs/message_cannot_initialize_sftp_protocol
_________________
Martin Prikryl
edman

Guest


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.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
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:
http://winscp.net/eng/docs/message_cannot_initialize_sftp_protocol
_________________
Martin Prikryl
zbalogh

Guest


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.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License