Home » How To » How to Connect as “root” Using WinSCP

How to Connect as “root” Using WinSCP

My development implementation works, so I have progressed to using the cloud-hosted bitnami instance. This comes with public key access rather than password access. This actually makes it easier to connect.

  1. Download your private key, if using bitnami use the cloud console, if using AWS use the AWS console. Store it with no spaces in the file name.
  2. Verify that you can connect using PuTTY
  3. Download WinSCP

You now have two choices, you may use the SFTP protocol or the SCP protocol. My experience shows that connecting with SCP is easier using the below two methods.

  1. Use the SCP Protocol
  2. Use the SFTP Protocol

Use the SCP Protocol

  1. Test connecting with WinSCP using the SCP protocol and the bitnami (low privileged user) and your private key.
  2. On the Advanced tab of WinSCP specify the Shell to be
    1. sudo su-

Use the SFTP Protocol - mytechmint

Use the SFTP Protocol

  1. Test connecting with WinSCP using the SFTP protocol using the bitnami (low privileged user) and your private key.
  2. Find the location of the SFTP server, you will enter this into WinSCP later
    • $ whereis sftp-server
  3. On the Advanced tab of the WinSCP specify the sudo -s command to run the server as su. This works because you are using PKI and are not asked to provide a password when you sudo.
    1. sudo -s  /usr/lib/sftp-server
Related:  How to Enable God Mode in Windows 7

Use the SFTP Protocol - mytechmint

You should now be able to connect. 🤓

2 thoughts on “How to Connect as “root” Using WinSCP”

Leave a Comment