This is purely for the comparison. My recent post was about the same thing but on Windows. Nasty business. And here is a guide for Linux/Mac – it is so much easier.
The difference is that here I use SCP, and for Windows I used SFTP. That is because even after generating the keys with PuTTYgen I could not figure out how to “install” them into PuTTY to use a command pscp -scp (the PuTTY scp) in the Command Prompt. That and the fact that my teammate was more comfortable with GUIs, so I picked the first thing that worked.
Generate a public SSH key
With a command:
ssh-keygen -t rsa
Copy the public key
Install it on the server
By adding it to this file (a new line, but don’t add empty lines):
Move files from one directory to another
If you have your public SSH key on the server, using this command you can transfer files to the server.
scp -r <source> <user>@<server>:<destination>
source – the absolute path of your project folder on your computer
destination – the absolute path of the folder where you want to copy the files