I kinda like this idea. I think there should be 3 modes of this feature...
- Direct/built-in su/sudo support (without any extra script {or other "hacking" to make it work}, that is)
- Support for any "custom" password prompt (or any custom prompt at all? {password or otherwise})
- While WinSCP is connecting, if the connection "freezes" for any reason (something is reading stdin), WinSCP could show the recent startup lines (the console output) & ask the user to answer any question the server is asking.
Direct/built-in support for "su" & "sudo" should be added: that is a major use-case...ALL "root" users
should login as "someuser" & then su or sudo to root.
Anytime after login/connection, WinSCP could have a "Switch Remote User" option, which would invoke either su or sudo to perform the change...but of course, there should also be a login/connection option "Immediately Switch Remote User after login"...like have 2 Username fields on the Login/Connection Info box.
Beyond that, support for a "custom" password prompt would be good too, just in case someone needs a custom script beyond the built-in su/sudo detection above.
I think this should be a WinSCP feature, mostly cuz doing this manually is convoluted: if I had this need, I would NEVER have come up with the script this guy wrote for it (I'm still not even sure I understand the explanation of the script)...I think it's just easier to make WinSCP support it, than to "invent" ways around WinSCP not supporting it. At the very least the su/sudo support should be added, since that is a common security practice of "never login directly as root".
Skeeve wrote:
No comment at all?
...sorry, but no one comes here, unless they have a problem or they "wanna check on WinSCP again".