I have a situation similar to others, where if I am logged in (via PuTTY) and I need root access, I use su and supply another password. I made the adjustments described in the oft-referred to FAQ, that is, I added the [my username] ALL=(ALL) NOPASSWD: ALL to the /etc/sudoers file, then in WinSCP, I switched to the SCP protocol, and adjusted the shell command to "/bin/bash -c 'sudo su -'".
I think I did all this correctly. I can execute that same command by hand in PuTTY, and it takes me right to the root user with no complaints.
When I finally try to log in with WinSCP, it gets almost all the way, then I get the message "Connection has been unexpectedly closed. Server sent command exit status 1." When I check the log, everything looks fine until near the end, where it has the following lines.
! 2007-11-03 23:48:17.453 sudo: sorry, you must have a tty to run sudo
. 2007-11-03 23:48:17.453 All channels closed. Disconnecting
. 2007-11-03 23:48:17.453 Selecting events 0 for socket 460
. 2007-11-03 23:48:17.453 Server closed network connection
* 2007-11-03 23:48:17.468 (ESshFatal) Connection has been unexpectedly closed. Server sent command exit status 1.
* 2007-11-03 23:48:17.468 Error skipping startup message. Your shell is probably incompatible with the application (BASH is recommended).
Not being a sys admin, I'm scratching my head over the "tty" issue. Anyone have any suggestions?