Substituting WinSCP in Ubuntu

I’ve decided to try using Ubuntu as my default operating system on my personal laptop. So far, I am very satisfied, however I have come across some issues that needed more than one google search to solve. One was substituting WinSCP on my Ubuntu 18.04. I connect to my server using a private ppk key I’ve generated in puttygen. The server I am connecting to, is already configured for ssh with my public key.

Convert Putty private (ppk) key to OpenSSH

First thing you need to do when you were used to using keys generated by puttygen in Windows, is to convert them into OpenSSH, which can be used on linux. I installed Putty SSH Client on Ubuntu, opened the terminal and ran the following command:

puttygen keyfile.ppk -O private-openssh -o keyfile.pem

If you try to use the generated keyfile.pem right away, you will run into problems, because the system won’t allow you to use files that can be read by other users so change the permissions by running:

chmod 700 keyfile.pem

Configuring the SSH Connection

Now you need to configure the connection. You can do this by creating or changing the ~/.ssh/config file. Add the following lines to the file:

Host my_wordpress
HostName my-server-url.com
IdentityFile /path-to/keyfile.pem
User username
Compression yes
  • Host – name of the connection
  • HostName – IP or URL to the server
  • IdentityFile – your OpenSSH private key file
  • User – username

Using Nautilus to Connect as Usual

All you have to do now is to connect with the default file explorer Nautilus for Ubuntu 18.04:

  • open Nautilus
  • click on + Other Locations
  • next to Connect to Server write ssh://my_wordpress or whatever you wrote in the Host section of your config file

You should connect to the server and be able to browse the files as you are used to in WinSCP.

Leave a Reply

Your email address will not be published. Required fields are marked *