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

DC

Cannot initialize SFTP protocol. Is the host running an SFTP server? VCSA

I was facing this issue while trying to connect WinSCP to VCSA 6.5.
Problem: Connect to VCSA via PuTTY you will get below screen instead of
Connected to service


    * List APIs: "help api list"
    * List Plugins: "help pi list"
    * Enable BASH access: "shell.set --enabled True"
    * Launch BASH: "shell"

Try the following steps:
Toggling the vCenter Server Appliance default shell

Once you permanently configure the default Shell to BASH for Root this issue will be fixed.
User_hidd3n

Awesome this worked! Thanks!!!

@Guest: Awesome this worked! Thanks!
martin

Re: Cannot initialize SFTP protocol. Is the host running a SFTP server.

@gaurav0918: That's not a solution. That's a workaround for a misconfigured SFTP server. Please get the server fixed instead.
gaurav0918

Cannot initialize SFTP protocol. Is the host running a SFTP server.

Issue: We get this error while accessing SFTP server through Windows 10 machine:
Cannot initialize SFTP protocol. Is the host running a SFTP server? WinSCP error

Solution: Provide the path of the SFTP server, as shown in attached screenshot.
Guest

Try this:
usermod -s /bin/bash user

(change user with your FTP/SFTP username)
venkat

Your password might be expired. Log in to PuTTY using the same credentials and change the password.
Raju Balpande

Solution: This is because the password is expired. Change password using putty.

Hi all,
I faced this error, it was due to my password was expired, When I tried to login to terminal console using PuTTY it asked me to reset the password. After resetting password I am able to log in using WinSCP.

Thanks,
Raju Balpande.
Charles87

Re: home dir hidden files

metal wrote:

Please check the .profile, .bash_history, .bash_logout and .bashrc

This worked for me too! Thanks for the tip!
Mystical2k

Re: home dir hidden files

Change the ForceCommand line in /etc/ssh/sshd_config to:
ForceCommand internal-sftp


For me too after days of trying out different file configs! Awesome!
martin

Re: Cannot initialize SFTP protocol. Is the host running a SFTP

IvanSP wrote:

I was getting this error because my password expired. I reseted my password using PuTTY and worked.

Thanks for sharing this.
You would actually find this resolution, if you follow link to "Server unexpectedly closed network connection" from:
https://winscp.net/eng/docs/message_cannot_initialize_sftp_protocol
IvanSP

Cannot initialize SFTP protocol. Is the host running a SFTP

I was getting this error because my password expired. I reseted my password using PuTTY and worked.
kevinleahy

For me the problem was that I was echo-ing text to the screen in .bashrc.
As soon as I removed this it worked.
David Docekal

Re: home dir hidden files

Change the ForceCommand line in /etc/ssh/sshd_config to:
ForceCommand internal-sftp


This helped!
Thanks a lot
Guest

Re: home dir hidden files

Change the ForceCommand line in /etc/ssh/sshd_config to:
ForceCommand internal-sftp
Guest

Re: home dir hidden files

metal wrote:

Please check the .profile, .bash_history, .bash_logout and .bashrc

Oh my gosh! Thanks a lot.

I've been wondering for a long time why I keep getting this message all of a sudden. Could have never figured that it would be a permission setting on a .bashrc file.
metal

home dir hidden files

Hello!

Please check the .profile, .bash_history, .bash_logout and .bashrc

They should have 755 permission – I changed these permission to 700 and started getting that same error.
Meir

Cannot initialize SFTP protocol. Is the host running a SFTP

Hi all,

I have the same error in my server.
In the first time I get the error message, In the second time I get the access.
I'm using with this connection MySecureShell to be able to lock the user in his HOMEDIR.

Some one have a clue about this error?
kevymerry

cannot intialize sftp

I received same message, I realized my password was about to expire. I reset password, and then was able to connect.
affinity

Resoluation to Problem

My son has an scponlyc "shell" login on one of my servers.

He started to get this error:
Cannot initialize SFTP protocol. Is the host running a SFTP server?

He was trying to connect using WinSCP ....

The problem was that the chroot home directory wasn't owned by root, so the login failed. I fixed this and made sure his group could write to the directory, but it is now owned by root.
martin

Re: Tried with just SFTP

Please read documentation for common reasons of getting this error and some resolution hints.
martin

Re: Tried with just SFTP

You may not have shell access. Or the SSH server cannot find/start the SFTP server.
dovid

Tried with just SFTP

Hi,

Just tried with just SFTP.

Got the same error.

It does connect to the server.

What do u think could be the problem on the server.

Thanks for your help.

dj
martin

Re: Cannot initialize SFTP protocol. Is the host running a SFTP

Try other SFTP client. If you still cannot connect, it's server-side problem.
dovid

Cannot initialize SFTP protocol. Is the host running a SFTP

Hi,

I'm having problems logging in for the first time:

The log is:
. 2006-02-09 13:59:00.828 Looking up host "99.99.99.99"
. 2006-02-09 13:59:00.828 Connecting to 99.99.99.99 port 22
. 2006-02-09 13:59:00.937 Server version: SSH-1.99-OpenSSH_3.6.1p2
. 2006-02-09 13:59:00.937 We claim version: SSH-2.0-WinSCP_release_3.8
. 2006-02-09 13:59:00.937 Using SSH protocol version 2
. 2006-02-09 13:59:01.000 Doing Diffie-Hellman group exchange
. 2006-02-09 13:59:01.156 Doing Diffie-Hellman key exchange
. 2006-02-09 13:59:02.000 Host key fingerprint is:
. 2006-02-09 13:59:02.000 ssh-rsa 1024 30:ef:42:c8:2f:ea:80:03:be:60:c0:f9:0a:b1:5c:d1
. 2006-02-09 13:59:02.000 Initialised AES-256 client->server encryption
. 2006-02-09 13:59:02.000 Initialised HMAC-SHA1 client->server MAC algorithm
. 2006-02-09 13:59:02.000 Initialised AES-256 server->client encryption
. 2006-02-09 13:59:02.000 Initialised HMAC-SHA1 server->client MAC algorithm
! 2006-02-09 13:59:02.140 Using username "userid".
. 2006-02-09 13:59:02.265 Keyboard-interactive authentication refused
. 2006-02-09 13:59:02.265 Session password prompt (userid@99.99.99.99's password: )
. 2006-02-09 13:59:02.265 Asking user for password.
. 2006-02-09 13:59:18.031 Sent password
. 2006-02-09 13:59:18.109 Access granted
. 2006-02-09 13:59:18.156 Opened channel for session
. 2006-02-09 13:59:18.218 Started a shell/command
. 2006-02-09 13:59:18.218 Server sent command exit status 1
. 2006-02-09 13:59:18.218 --------------------------------------------------------------------------
. 2006-02-09 13:59:18.218 Using SFTP protocol.
. 2006-02-09 13:59:18.218 Doing startup conversation with host.
> 2006-02-09 13:59:18.218 Type: SSH_FXP_INIT, Size: 5, Number: -1
. 2006-02-09 13:59:18.281 All channels closed. Disconnecting
. 2006-02-09 13:59:18.281 Server closed network connection
* 2006-02-09 13:59:18.281 (ESshFatal) Cannot initialize SFTP protocol. Is the host running a SFTP server?
* 2006-02-09 13:59:18.281 Connection has been unexpectedly closed. Server sent command exit status 1.

Any help is appreciated.

regards
David J.