I'm using WinSCP to access Unix computers. How can I change user after I have logged into a Unix server using WinSCP?
E.g. I have personal account in Unix computer A. I can log into this computer using PuTTY and then change user to root user
$sudo /usr/bin/su - rootuser
How can I do the same thing using WinSCP? I don't know the password for rootuser
.
Best Answer
I'm going to assume you can already sudo to the user in question ... ... in WinSCP setup for a new site:
Advanced:Shell: MAGIC-HAPPENS-HERE The "pick list" for Shell has "Default" selected. You will enter TEXT here...
/usr/bin/sudo -u TARGET-user-name -i
(above command varies by unix distro)
..... this should be all you need!