2

I am trying to login using WinSCP using correct username and password.

Under Environment> SFTP > SFTP Server I have specified sudo /usr/lib/openssh/sftp-server

Under Session I type in the Host name, User name and Password.

When I click on Login I get

Connection has been unexpectedly closed. Server sent command exit status 1.

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

sudo: no tty present and no askpass program specified

This is link to a complete log http://pastebin.com/GcmpK2kj

Community
  • 1
  • 1
user1544778
  • 39
  • 1
  • 1
  • 4

1 Answers1

1

Make sure you enable password-less sudo to the sftp-server. And make sure that the sudoers option requiretty is turned off.

Detailed instructions are in WinSCP FAQ How do I change user after login (e.g. su root)?

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992