• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Gokul Deepak

Gokul Deepak

GoCool and Debug

  • Home
  • Terraform
  • WordPress
  • Android
  • How to
  • About Me

How to Send Files from your localhost to Another Server through SSH

June 17, 2020 by Gokul Deepak S Leave a Comment

Objective: Upload Files/Folder from my local to server. (How to Send Files from your localhost to Another Server through SSH)

Challenge: I’m bored to use Filezilla. So just have to use putty or Git Bash or Windows Subsystem.

I have used Ubuntu Subsystem in my Windows 10 for SSH access.

Solution: Use Secure Copy Command from your local machine and login to server directly.

Command:

sudo scp -i key.pem -r /mnt/d/sourcefolder/ [email protected]:/var/html/destination/
  1. Sudo – So to not ask permission for each and every file.
  2. scp – Secure Copy command to copy files between servers. you should use scp so it would use SSH for transferring files and would use authentication like password or pem key.
  3. -i key.pem – this is the key for my server login authentication.
  4. -r -recursive files/subfolders inside the folder.
  5. /mnt/d/sourcefolder/ – Source folder in local.
  6. [email protected]: – user in the particular server and its IPv4. you can also use root or ubuntu.
  7. /var/html/destination – Destination folder

Task Completed Successfully.

Note: Remember that the folder copied to the server is under the user centos/root/ubuntu.

Filed Under: Linux

About Gokul Deepak S

Leave a ReplyCancel reply

0 Comments
Inline Feedbacks
View all comments

Primary Sidebar

Popular Pages

  • Home
  • How to find the date of the Facebook group it was created
  • How to remove Linux OS in Tamilnadu Government Free Laptop

Archives

Categories

  • Android
  • Apache
  • AWS
  • Blogger
  • Computer Tips
  • DevOps
  • Docker
  • Earn
  • Facebook Tips
  • Git
  • Google Tips
  • Hosting
  • How to
  • Laptop Tips
  • Laptops
  • Linux
  • Mobile
  • MongoDB
  • Nginx
  • Node JS
  • Notepad++
  • PostgresQL
  • Terraform
  • Ubuntu
  • Wordpress
  • Xenforo

Tags

Android Android One AWS Bluehost Comparisions Custom ROM Elementor Facebook Genesis Genesis Sample Theme Google Drive How to Lineage OS Notes OnePlus One OwnCloud Rooting Smartphones Stock ROM Studiopress Tomcat Wordpress plugin

Copyright © 2025 ยท Maintained by GokulDeepak

wpDiscuz