WinSCP Sudo Access for Ubuntu aMiSTACX

NOTE: We do NOT support SFTP client FileZilla for Ubuntu Linux, because it requires altering the default ubuntu user permissions.

WinSCP is a powerful and flexible SFTP client, and provides a very convenient GUI interface for our Ubuntu aMiSTACX AWS EC2 servers. You can set file permissions, do file transfers, and so much more!

However, a standard configuration omits the ability to elevate to sudoer level access. In order to allow this elevated privlage, you’ll need to configure the WinSCP client as follows:

First – Get WinSCP >>

Part I – The Basics

Step 1. Set username to ubuntu [Shown in image one.]

Step 2. Under Advanced Settings > SSH > Authentication, set path to your PPK file. This PPK file is derived from your PEM file on AWS using PUTTYGEN.exe

Part II – Sudo Access

Step 1. Go to WinSCP Advanced settings. [Shown in image one.]

Step 2. Under Advanced Settings > Environment > Shell, select sudo su – from the drop-down menu.

Step 3. Under Advanced Settings > Environment > SFTP, copy and paste this line to the SFTP Server Field:

sudo -s /usr/lib/sftp-server

Step 4. Click Save

More Useful WinSCP Tips!

How to show hidden files in sessions:

Step 1. Connect to a LIVE session

Step 2. In the WinSCP Top Menu select Options >> Preferences

Step 3. In the Left-Hand menu select “Panels”

Step 4. Check the box Show Hidden Files

Step 5. Select “OK” to close the dialog box.

Another cool useful feature – Permissions!

Right-clicking any file and select Properties will bring up an input box where you can set Linux file and folder permissions, push them down to sub-directories, and change user and group.

How cool is that? An extremely useful feature.

Even More useful connection tips – Keepalives!

If you are in the situation where your WinSCP connection is constantly getting dropped, a useful option is to initiate keepalives.

You are now finished, and can see and access ALL of your files with sudoer level access.

1 Comment

Leave a comment