How do I login as a root in WinSCP.
This page tells you how to connect in WinSCP with root user or how to
run sudo su command from WinScp after login. I was connecting through
WinSCP to transfer files from my windows laptop to a RED Hat linux
machine in AWS cloud. I was using private key for authentication.
However the files was not getting transfered as the user account to be
used had to have root access. For this task, We need to elevate to root user
Now question is how can I elevate a loged in user to root user in WinScp (SFTP) or How
can I run sudo su When I am using WinScp to upload or downlod files.
Good news is that , WinSCP can elevate loged in user to root after login if we set
up some values;
Please follow the following steps.
1. Login to your linux m/c using Putty
and find location of sftp-server location. It varies from OS to OS
find -name sftp-server
In my linux (RedHat)m/c path is : /usr/libexec/openssh/sftp-server
2. Open WinScp. Navigate to (Session >
Sites > Site Manager)
3. Select the saved session and click on
the "Edit" button.
4. Click on Advanced button. Then
navigate to SFT > SFTP Server.
Set the value
sudo su -c /usr/libexec/openssh/sftp-server
5. Save the value and login.
Now you should be logged in succesfully and current user will be elevated to root user. I mean current user will have root access.