How do I set up SSH to transfer files from my local machine to a shared server with rsync?

MeltingDog

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?

Ljm Dullaart

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.

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

How do I set up a server for SSH?

분류에서Dev

How do I make rsync skip files that failed to transfer?

분류에서Dev

How do I SCP from remote machine to local machine when I am outside of my home network?

분류에서Dev

rsync Permission denied backing up a remote directory to my local machine

분류에서Dev

How do I set up a local SOCKS proxy that tunnels traffic through SSH?

분류에서Dev

How do I set up an email server?

분류에서Dev

How to copy files from remote server to local machine?

분류에서Dev

Using Python, how to download multiple files from a subdirectory on FTP server into a desired directory on local machine?

분류에서Dev

I have a domain name that I want to redirect to my local server. How do I do this?

분류에서Dev

How to backup files from one ubuntu machine to a shared NTFS drive on another ubuntu machine

분류에서Dev

How do you copy files from a remote server to a local folder in emacs using dired/tramp?

분류에서Dev

what is the default speed in rsync to send from local to remote machine?

분류에서Dev

How to access shared host files on virtual machine?

분류에서Dev

How do I set up Emacs on Linux to read/send mail from Gmail?

분류에서Dev

How do I set the value of my field so that I can call it from another class?

분류에서Dev

How do I run a executable .sh file on a remote server from local in its remote-existed path?

분류에서Dev

How can I audit users and access attempts to SSH on my server?

분류에서Dev

How to copy file contents to the local clipboard from a file in a remote machine over ssh

분류에서Dev

How can I copy files from my internal drive to an external USB 3.0 drive if Windows doesn't boot up?

분류에서Dev

How do I make files copied over the network from my Windows computer be owned by me?

분류에서Dev

How do I route my internet through a SSH tunnel?

분류에서Dev

How do I zip up multiple files on command line?

분류에서Dev

How do I back up my Linux system

분류에서Dev

How do I get my local git stuff into BlueMix?

분류에서Dev

How do I set up a bash alias for a common working folder?

분류에서Dev

If I wanted to save uploaded files in '/usr/local' using my grails app, do i need to grant permissions?

분류에서Dev

How can I work on files on my server and keep them in sync?

분류에서Dev

How can I work on files on my server and keep them in sync?

분류에서Dev

How do I remove "ghost" backups from Time Machine?

Related 관련 기사

  1. 1

    How do I set up a server for SSH?

  2. 2

    How do I make rsync skip files that failed to transfer?

  3. 3

    How do I SCP from remote machine to local machine when I am outside of my home network?

  4. 4

    rsync Permission denied backing up a remote directory to my local machine

  5. 5

    How do I set up a local SOCKS proxy that tunnels traffic through SSH?

  6. 6

    How do I set up an email server?

  7. 7

    How to copy files from remote server to local machine?

  8. 8

    Using Python, how to download multiple files from a subdirectory on FTP server into a desired directory on local machine?

  9. 9

    I have a domain name that I want to redirect to my local server. How do I do this?

  10. 10

    How to backup files from one ubuntu machine to a shared NTFS drive on another ubuntu machine

  11. 11

    How do you copy files from a remote server to a local folder in emacs using dired/tramp?

  12. 12

    what is the default speed in rsync to send from local to remote machine?

  13. 13

    How to access shared host files on virtual machine?

  14. 14

    How do I set up Emacs on Linux to read/send mail from Gmail?

  15. 15

    How do I set the value of my field so that I can call it from another class?

  16. 16

    How do I run a executable .sh file on a remote server from local in its remote-existed path?

  17. 17

    How can I audit users and access attempts to SSH on my server?

  18. 18

    How to copy file contents to the local clipboard from a file in a remote machine over ssh

  19. 19

    How can I copy files from my internal drive to an external USB 3.0 drive if Windows doesn't boot up?

  20. 20

    How do I make files copied over the network from my Windows computer be owned by me?

  21. 21

    How do I route my internet through a SSH tunnel?

  22. 22

    How do I zip up multiple files on command line?

  23. 23

    How do I back up my Linux system

  24. 24

    How do I get my local git stuff into BlueMix?

  25. 25

    How do I set up a bash alias for a common working folder?

  26. 26

    If I wanted to save uploaded files in '/usr/local' using my grails app, do i need to grant permissions?

  27. 27

    How can I work on files on my server and keep them in sync?

  28. 28

    How can I work on files on my server and keep them in sync?

  29. 29

    How do I remove "ghost" backups from Time Machine?

뜨겁다태그

보관