Connecting Linux server to a Private Space
Print
Modified on: Sun, 9 Apr, 2017 at 12:27 PM
Initial Steps
- Get a link to the file with a connection key for the server from https://private.space
- go to "Manage Devices"
- select the device for the server, or create a new one by clicking on "Add Device" at the bottom of the page
- once on the device detail page, copy the "Server install" link.
- open/go to the terminal or ssh session to the server
Distribution Specific Steps
Centos 7
- Install the openvpn and wget packages (as root): yum install openvpn wget
- change the working directory: "cd /etc/openvpn"
- download the file for "Server Install": wget -O server_key.ovpn <server install link>
- change the working directory: "cd /etc/rc.d/"
- crate a bash script for starting openvpn - vim openvpn.sh:
#!/bin/sh
killall openvpn
sleep 2
nohup openvpn --config /etc/openvpn/server_key.ovpn 1>/dev/null 2>&1 &
- save the file
- make the new file executable: "chmod uog+x openvpn.sh"
- edit the rc.local file: "vim rc.local" - add the following line:
sudo -s -- /etc/openvpn.sh
- make sure the "rc.local" file is executable and also that it contains "#!/bin/sh" on the first line
- reboot the server (if you can) and check the server is connected to your Private Space
Debian
- Install the openvpn and wget packages (as root): apt-get install openvpn wget
- change the working directory: "cd /etc/openvpn"
- download the file for "Server Install": wget -O server_key.ovpn <server install link>
- change the working directory: "cd /etc/"
- crate a bash script for starting openvpn - vim openvpn.sh:
#!/bin/sh
killall openvpn
sleep 2
nohup openvpn --config /etc/openvpn/server_key.ovpn 1>/dev/null 2>&1 &
- save the file
- make the new file executable: "chmod uog+x openvpn.sh"
- edit the rc.local file: "vim rc.local" - add the following line:
sudo -s -- /etc/openvpn.sh
- make sure the "rc.local" file is executable and also that it contains "#!/bin/sh" on the first line
- reboot the server (if you can) and check the server is connected to your Private Space
Did you find it helpful?
Yes
No
Send feedback Sorry we couldn't be helpful. Help us improve this article with your feedback.