Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-18-2014, 06:00 PM   #16
LQ Guru
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,533

Rep: Reputation: 2108Reputation: 2108Reputation: 2108Reputation: 2108Reputation: 2108Reputation: 2108Reputation: 2108Reputation: 2108Reputation: 2108Reputation: 2108Reputation: 2108

Back to step one

what is the command you use to SSH into the Amazon server?

Since scp is based on the ssh protocol, the scp command should look very similar to your ssh command, just with the addition of a file that you want to copy and where you want to copy it, and possibly with a renamed flag or two.

For example, if you use
ssh -p 43533 user@host
to ssh into a machine, you would use
ssh -P 43533 user@host:/path/to/file .
to scp a file from that machine to your pwd.

Your ssh command will give you 99% of the syntax you need for scp.

Last edited by suicidaleggroll; 02-18-2014 at 06:03 PM.
1 members found this post helpful.
Old 02-18-2014, 06:57 PM   #17
LQ Newbie
Registered: Feb 2014
Posts: 9

Original Poster
Rep: Reputation: Disabled
Here's my SSH command:

ssh -i openvpn.pem ubuntu@XX.XX.XX.XX
And here's my SCP command:

scp ubuntu@XX.XX.XX.XX:/etc/openvpn/openvpn-key.txt /Users/XXXXX/Desktop
AND...fixed. Your comment:

Your ssh command will give you 99% of the syntax you need for scp.
clued me in to what I was missing. The -i flag and .pem file in the SSH command was missing from my SCP command, thus the permission denied error. Once added the file copied successfully!

Thanks all for the help!

Last edited by bowserface; 02-18-2014 at 07:00 PM.
Old 02-19-2014, 08:06 AM   #18
LQ 5k Club
Registered: Jan 2011
Location: Nowhere near you, thank God.
Distribution: OSX Sierra
Posts: 8,570
Blog Entries: 14

Rep: Reputation: Disabled
See this:


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
SCP: Copy file from remote linux server onto a windows machine? Tony Empire Linux - Newbie 21 09-22-2015 10:18 PM
[SOLVED] Having trouble copying directories to remote machine using scp mothergoose729 Linux - General 1 09-29-2013 04:18 PM
[SOLVED] How can I ssh/scp into a remote's machine local machine? venom4u31 Linux - Newbie 6 11-05-2011 01:36 PM
scp: copy a file from local machine to remote machine seran Linux - Newbie 8 10-30-2007 12:23 PM
Running X-application on a remote AND local machine LinuxFrosh Linux - Software 1 07-04-2006 10:24 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:27 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration