0

I have been directed here from Stack Overflow, so please be aware that I am coming from a web dev background with limited knowledge of DevOps.

I am learning Gulp and node.js and want to use it to transfer file from my local machine to a remote shared server. I've installed rsync and have set up my Gulp command ready to go.

However I am unsure as to how to set up SSH for the remote server.

I've generated a public and private key on CPanel and have downloaded the id_rsa file to my PC (MacOS). But I am not sure what to do next.

Would anyone know what I should be doing?

I thought I should add this id_rsa file to the system's .ssh directory but there is already an id_rsa file there (that I set up for Github awhile back). How can I use both files?

1 Answer 1

1

You have two systems:

  • a server
  • a client

If you want to access the server from your client, you must generate a private/public key set on the client. The private key is secret. It is in is_rsa and should never leave the (client-)computer. Your public key is in id_rsa.pub and that is the key that must be transferred to the server.

On the server, put the contents of id_rsa.pub that you uploaded from the client in .ssh/authorized_keys.

Make sure all files have the right permissions (600) and .ssh has permission of 700.

1
  • Thank you very much for writing this answer clearly and concisely. That is appreciated. Commented Dec 26, 2018 at 13:03

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.