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

Gokul Deepak

GoCool and Debug

  • Home
  • WordPress
  • Android
  • How to
  • About Me
Home » Linux » How to Send Files from your localhost to Another Server through SSH

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

June 17, 2020 by GokulDeepak 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.

Related

Filed Under: Linux

Authored by Gokul Deepak S

Reader Interactions

Leave a Reply Cancel reply

Primary Sidebar

Popular Posts

  • How to find the date of the Facebook group it was created
  • Home
  • Downgrade from Lollipop to Kitkat for Micromax Canvas A1 (Android One)
  • How to remove Linux OS in Tamilnadu Government Free Laptop
  • How to block access to the wp-content uploads folder
  • How to add ads.txt on Bluehost
  • Combine two separate files line by line in Notepad++

Recent Posts

  • Can’t connect to Ubuntu with SSH
  • Change Timezone in Ubuntu 20.04 – Simple method
  • Output for timedatectl list-timezones
  • PM2 Cheatsheet – Important Commands
  • MongoDB Terminal commands – Cheatsheet

Archives

Categories

  • Android
  • Apache
  • Blogger
  • Computer Tips
  • Earn
  • Facebook Tips
  • Git
  • Google Tips
  • How to
  • Laptop Tips
  • Laptops
  • Linux
  • Mobile
  • MongoDB
  • Nginx
  • Notepad++
  • PostgresQL
  • Ubuntu
  • Wordpress
  • Xenforo

Tags

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

Copyright © 2021 ยท Maintained by GokulDeepak