Jump to content

Issue getting my PiVPN config file off my Pi

Hello, so I tried to setup PiVPN on my raspberry pi zero. I got it installed and configured completely. But at the final stage, which is creating a config file for your clients, I have been unsuccessful with getting the file off the Pi. I initially tried the scp command, but I either had directory issues or did not have permission. I tried to do it manually by booting up a Linux Mint VM and plugging in my micro SD card, but I could not copy the file off the VM or upload it to a cloud service due to not having "permission". There were also error messages saying the drive was not mounted, even though the SD card shows up on the desktop of my VM? 

 

This is the guide I followed: https://circuitdigest.com/microcontroller-projects/turn-your-raspberry-pi-zero-in-to-a-vpn-server-using-openvpn

 

The scp command is where the issues showed up. So yeah, if I can't send the file over SSH and I can manually copy the file off the Pi....what can I do? Seems like a whole lot of nothing. 

 

Thanks. 

Laptop: 2019 16" MacBook Pro i7, 512GB, 5300M 4GB, 16GB DDR4 | Phone: iPhone 13 Pro Max 128GB | Wearables: Apple Watch SE | Car: 2007 Ford Taurus SE | CPU: R7 5700X | Mobo: ASRock B450M Pro4 | RAM: 32GB 3200 | GPU: ASRock RX 5700 8GB | Case: Apple PowerMac G5 | OS: Win 11 | Storage: 1TB Crucial P3 NVME SSD, 1TB PNY CS900, & 4TB WD Blue HDD | PSU: Be Quiet! Pure Power 11 600W | Display: LG 27GL83A-B 1440p @ 144Hz, Dell S2719DGF 1440p @144Hz | Cooling: Wraith Prism | Keyboard: G610 Orion Cherry MX Brown | Mouse: G305 | Audio: Audio Technica ATH-M50X & Blue Snowball | Server: 2018 Core i3 Mac mini, 128GB SSD, Intel UHD 630, 16GB DDR4 | Storage: OWC Mercury Elite Pro Quad (6TB WD Blue HDD, 12TB Seagate Barracuda, 1TB Crucial SSD, 2TB Seagate Barracuda HDD)
Link to comment
Share on other sites

Link to post
Share on other sites

Odd the config file is generated in your user home directory so your pi user should already have ownership. Whats the output of

ls -la ~/ovpns/

 

Link to comment
Share on other sites

Link to post
Share on other sites

  • 1 year later...

I just resolved a similar issue using headless DietPi. By default, my install of DietPi uses Dropbear SSH server. As I understand, Dropbear does not have a command named scp. In dietpi-launcher, I changed the SSH server to OpenSSH, which does support scp.

 

scp user@hostname:/Host/remote/file /Client/local/file was accepted by the DietPi server, but I was then alerted that the hostkey for that server did not match the one previously stored on my client/desitination computer:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:XXXXXXXXXXX

According to some duckduckgoing, Dropbear and OpenSSH use a different keygen I guess? I cleared the file used to check known hosts (for OSX this is /Users/USERNAME/.ssh/known_hosts) and tried scp again. Success!

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×