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

nilven

winscp

Hi, I want to share my solution because I'm also searching several time for a workaround. I'm using CentOS7 right now and try to get connetion via WinSCP (Pubkey Auth).

sshd_config

 ..

    RSAAuthentication yes
    PubkeyAuthentication yes
    AuthorizedKeysFile   .ssh/authorized_keys
    PasswordAuthentication no
    UsePAM yes
    ..



@CentOS
visudo - add following 2 entrys

 username ALL=NOPASSWD: /bin/su

    Defaults:username !requiretty


WinSCP settings:

Disable keyboard-interactive @ SSH authentication settings solves the problem for me.
Shell command in SCP-settings: sudo su -
patrick73

I have the same problem (also with Ubuntu Linux 12.04.2 ).
my log :
sshd[34150]: Accepted password for myusername from 100.000.000.001 port 44253 ssh2

sshd[34150]: pam_unix(sshd:session): session opened for user myusername by (uid=0)
sudo: pam_unix(sudo:auth): conversation failed
sudo: pam_unix(sudo:auth): auth could not identify password for [myusername]
sudo: pam_unix(sudo:auth): conversation failed
sudo: pam_unix(sudo:auth): auth could not identify password for [myusername]
sudo: pam_unix(sudo:auth): conversation failed
sudo: pam_unix(sudo:auth): auth could not identify password for [myusername]
sudo:  myusername : 3 incorrect password attempts ; TTY=unknown ; PWD=/home/myusername ; USER=root ; COMMAND=/usr/lib/openssh/sftp-server
sshd[34150]: pam_unix(sshd:session): session closed for user myusername


in sudoers (with visudo) because there isnot "requiretty" option, i have try to add this:
Defaults:myusername!requiretty

and also add this line :
myusername ALL=NOPASSWD: /usr/lib/openssh/sftp-server

but dont work too!
In this ubuntu version, root isnt activated by default (for security raisons) so i prefer not active it...

Can you help me ?
martin

Re: Ubunut sudo su Cannot initialize SFTP protocol. Is the host

How do you "set sudo"?
Did you check this guide?
https://winscp.net/eng/docs/faq_su

Anyway, you should check the server's log.
Torwart91

Ubunut sudo su Cannot initialize SFTP protocol. Is the host

Hi,

I have a issue with my Winscp. If I login without using sudo it working fine.
But if i set sudo I get the Error:

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


I'am using Ubunutu 12.04.2.

Thank for help!

(I hope you understand everything I wrote, sorry for my english ;) )