This is an old revision of the document!

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

You cannot change a user in the middle of file transfer session with neither of protocols WinSCP supports (SFTP, FTP and SCP). So you need to start with the correct user straight away.

Direct Login

Easiest way is to allow direct login with the user account you need, if it is not allowed already. For accounts such as root, the direct login is typically disabled by default for security reasons. So when enabling it, have security in mind.

Particularly with SSH, you may want to keep password authentication (the most vulnerable one) disabled and use e.g. public key authentication instead. With OpenSSH server, you can do that by setting sshd_config keyword PermitRootLogin to without-password1.

= Use sudo on Login = va te faire enculer

  1. Even more restrictive option forced-commands-only may work with SFTP protocol, but it has not been tested.Back

Last modified: by 88.163.78.48