WinSCP howto automatically login as root user

In Ubuntu and other Linux distribution the “root” user is not directly accessible with a login operation without first doing an intermediate login with an unprivileged user.

When using WinSCP, or other software for remote file management, while you get a minimum of extra security on the other hand there is a significant amount of time and frustration that is generated by trying to access files with an unprivileged user accounts.

Luckly, you can configure WinSCP to log in automatically from an unprivileged user into the “root ” user, by following these simply steps:

log intoyour system and became “root” via su or sudo;

launch the command “visudo“and configure it to allow other users to became “root” without a password by adding the following line:

user ALL = (ALL) NOPASSWD: ALL

the string “user” must be changed with the name of your regular unprivileged user;

finally, to save and exit visudo (vi editor), enter the command

:wq

Then change the following option into the WinSCP program: “Environmen t>> SCP >> Shell” from “Default” in:

sudo su -

Now try to login with WinSCP, you will be logged in directly in as “root”.

WinSCP howto automatically login as root user, 4.8 out of 5 based on 4 ratings