WinSCP login issue with sudo

11,231

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)?

Share:
11,231
user1544778
Author by

user1544778

Updated on June 04, 2022

Comments

  • user1544778
    user1544778 about 2 years

    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