Tracker »

Issue 1247 – Allow providing a password to sudo

: General
: Unspecified
: Enhancement
: Medium
: NEW
:
Possible implementation would be for WinSCP to "expect" a password prompt in the session, prompt for the password and send it back to the server.
The session then could be configured to start with:
SUDO_ASKPASS=./mypass sudo sudo /bin/sftp-server
Where mypass would prompt for the password, read it and print it back to sudo.
The command could even create the "askpass" script on the fly.
Though this all feels like a huge hack and bypass of alls the sudo security features.
The best solution is still to use public key authentication for root access.