LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947

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
Code:
ssh -p 43533 user@host
to ssh into a machine, you would use
Code:
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 07:03 PM.
 
1 members found this post helpful.
Old 02-18-2014, 07:57 PM   #17
bowserface
LQ Newbie
 
Registered: Feb 2014
Posts: 9

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

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

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

Quote:
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 08:00 PM.
 
Old 02-19-2014, 09:06 AM   #18
Habitual
LQ Addict
 
Registered: Jan 2011
Location: Youngstown, Ohio
Distribution: LM17.1/Xfce4.11.8
Posts: 7,163
Blog Entries: 10

Rep: Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979Reputation: 1979
See this: http://docs.aws.amazon.com/AWSEC2/la...ncesLinux.html
 
  


Reply


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 11:18 PM
[SOLVED] Having trouble copying directories to remote machine using scp mothergoose729 Linux - General 1 09-29-2013 05:18 PM
[SOLVED] How can I ssh/scp into a remote's machine local machine? venom4u31 Linux - Newbie 6 11-05-2011 02:36 PM
scp: copy a file from local machine to remote machine seran Linux - Newbie 8 10-30-2007 01:23 PM
Running X-application on a remote AND local machine LinuxFrosh Linux - Software 1 07-04-2006 11:24 AM


All times are GMT -5. The time now is 06:42 PM.

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