Switching users using WinSCP between different accounts

KItis picture KItis · Jul 13, 2012 · Viewed 17.6k times · Source

Is there way to switch between user accounts using WinSCP?

When I am using PuTTY, I can use su command to switch users between different accounts.

For an example:

kitis@localhost$
kitis@localhost$ su abc
abc@localhost$

In the same way, when I am using WinSCP, is there a way for me to switch users while I have logged in to a server?

Answer

Martin Prikryl picture Martin Prikryl · Mar 20, 2014

There is a FAQ for this question on WinSCP site:
How do I change user after login (e.g. su root)?

You need to specify the sudo command in WinSCP session settings, as custom shell (if you are using SCP) or use sudo in custom SFTP server startup command (if you are using SFTP).

Though there are some limitations, notably that you need to configure sudo not to require a password.

See the link for details.