This is an old revision of the document!

How do I change user after login (e.g. su root)?

SFTP and FTP protocols do not allow this.

With SCP protocol it is possible, but actual method is platform dependant. For example on Unix platforms, you can specify following command as custom shell on SCP/Shell tab of Login dialog:

/bin/bash -c 'sudo su -'

Advertisement

You can do this only if you are allowed to do sudo su without being prompted with password. See sudo documentation to learn how to do that. For example you can add following line to sudoers file (/etc/sudoers):

yourusername ALL=(ALL) NOPASSWD: ALL

Note that as WinSCP does not allocate TTY, you need to have sudo option requiretty turned off (what is default).

Last modified: by martin