How to Uploading files through SSH?

  • To begin, log in to your server as the root user through SSH.
  • If you wish to upload a specific file, use the following command:
    • $ sudo scp -C -i <path-to-file-identity-file> \
    • <full-path-to-file> <remote-user>@<remote-ip>:<full-path-to-save>
  • To upload an entire folder, utilize this command:
    • $ sudo scp -C -i <path-to-file-identity-file> \
    • -r <full-path-of-folder-to-upload> <remote-user>@<remote-ip>:<full-path-to-folder-where-to-save>

  • 16 Users Found This Useful
Was this answer helpful?