[Resolved] Trouble SCP'ing static key off remote server

This forum is for general conversation and user-user networking.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Locked
foundrman
OpenVpn Newbie
Posts: 8
Joined: Tue Oct 01, 2013 2:43 pm

[Resolved] Trouble SCP'ing static key off remote server

Post by foundrman » Mon Feb 17, 2014 8:29 pm

Hello All,

I am in the process of reconfiguring a remote OpenVPN server- I interact with it solely through SSH for now.

Getting away from certificates because of a particular users location we're setting up keys, and I generated a static key on the remote box

Code: Select all

sudo openvpn --genkey --secret /etc/openvpn/openvpn-key.txt
I'm now trying to SCP that file to my local machine. After hitting one brick wall after another, if I run the SCP command from my local machine I get the following:

Code: Select all

Warning: Identity file openvpn-key.txt not accessible: No such file or directory.
ssh: connect to host XX.XXX.XXX.XXX port 22: Network is unreachable
If I run the SCP command on the remote machine, it asks for a passphrase that I don't have nor ever created.

I've modified permissions on the remote file (though maybe not correctly?). I recognize that this may very well not be an OpenVPN issue, and as such I will certainly go elsewhere...but I thought I'd start here.

Thanks so much!
Last edited by debbie10t on Wed Feb 19, 2014 1:25 am, edited 1 time in total.
Reason: [Resolved / closed]

User avatar
maikcat
Forum Team
Posts: 4200
Joined: Wed Jan 12, 2011 9:23 am
Location: Athens,Greece
Contact:

Re: Trouble SCP'ing static key off remote server

Post by maikcat » Tue Feb 18, 2014 7:38 am

I recognize that this may very well not be an OpenVPN issue
scp command requires ssh service to be working...
so yes its not an openvpn issue

but to help you out you can scp FROM a server to a client (your pc),
what OS your client (your pc) is using?
can you write down the exact command given?

Michael.
Amiga 500 , Zx +2 owner
Long live Dino Dini (Kick off 2 Creator)

Inflammable means flammable? (Dr Nick Riviera,Simsons Season13)

"objects in mirror are losing"

foundrman
OpenVpn Newbie
Posts: 8
Joined: Tue Oct 01, 2013 2:43 pm

Re: Trouble SCP'ing static key off remote server

Post by foundrman » Tue Feb 18, 2014 11:53 pm

Thanks Michael, yes, this is not an OpenVPN issue.

I assumed ssh service was running since I can SSH to the remote machine without an issue. I would assume that if I can SSH successfully than the SSH service is running and thus SCP should work (all else being equal)

my client (local) is OS X
the command is, run from the local machine:

Code: Select all

scp ubuntu@XX.XX.XX.X:/etc/openvpn/openvpn-key.txt /Users/XXXXX/Desktop

foundrman
OpenVpn Newbie
Posts: 8
Joined: Tue Oct 01, 2013 2:43 pm

SOLVED: Re: Trouble SCP'ing static key off remote server

Post by foundrman » Wed Feb 19, 2014 1:07 am

As expected it was a (lame) syntax error. Adding the -i flag and the .pem file in the SCP command fixed the problem.

Thanks all!

Locked