How to move your project from Windows to a Linux server using SFTP

I abandoned Windows years ago. And I don’t remember the exact moment, but I believe it was something akin to localization issues (my Windows was in Russian).

But in my line of work I deal with different developers on different systems, and lately I have had a situation, where one of my teammates had to use SFTP on Windows… If SFTP on Linux/Mac is a very easy one and done thing, on Windows – not so much.

So I figured out a solution for them.

Disclaimer: On the screenshots the GUIs of the programs are in Russian, but in my text instructions I go through everything in great detail. I also wrote this guide in Russian and translated it with Google Translate, because I feel so lazy right now – I slept like 10 hours without interruption and I feel like I hit gym yesterday (but I actually hit McDonalds).

Just in case, in the environment variables, make sure that the Putty installation folder is added to the values of the Path variable (by default it is C:\ Program Files\PuTTY). You can check this with the pscp command on the command line.

Generate a key pair with PuTTYgen

Save the resulting public and private keys using the buttons somewhere you can find them later.

Click on New Connection.

In the modal window, the data must be set like this:

Transfer Protocol: SFTP
Hostname: <server address>
Port: 22 

Add your key to Winscp

In the same window, click the More … button.

In the new window, select SSHAuthentication. In the Authentication Settings, in the Private key file field, load your private key generated by PuTTYgen.

In the same window, click on the Show public key button (below the Private key file field).

Copy this key and install it on your remote Linux server. Once it is addeed to the server, then you will be able to login. Click on OK. Click on OK and Save.

When the key is installed and you are allowed to log into the server via SSH, click Enter in the first modal window. Then enter the user.

Try and connect

The SFTP connection should have been established.
By default, you are in a folder that you can get to with the cd ~ command.
To cd /, select / in the top right of this drop-down menu.

One thought on “How to move your project from Windows to a Linux server using SFTP

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.