Ubunut command to upload file on ssh/scp


For Amazon EC2:

  1. On your local machine, move to the location where file exists which you want to upload
  2. Run scp command
 scp -i ~/.ssh/mykey.pem myzipped_folder.zip  ubuntu@ec2-xx-xx-xx-xxx.us-west-2.compute.amazonaws.com:~/. 

Above command parts are mentioned below, change according to your server:


scp -i ~/PATH_TO_SSH_KEY/SSH_KEY_FILE_NAME.pem filename  VM_USER_NAME@PublicDNS:~/Destination_folder_on_VM

For non Amazon Linux server:

  1. On your local machine, move to the location where file exists which you want to upload
  2. Run scp command

scp File_OR_Folder_Name UserName@Host-Url:path_of_destination_folder
Advertisements

I am Senior Software Engineer. I love reading, writing, sharing,developing, hiking, movies, trips, mountains, brooks, hills etc.

Tagged with:
Posted in ssh

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

StackOverFlow
Categories
Archives
%d bloggers like this: