User Tools

Site Tools


vps_setup

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

vps_setup [2016/07/23 08:56] (current)
Line 1: Line 1:
 +======networking======
  
 +edit /​etc/​network/​interfaces
 +
 +===static ip===
 +<​code>​
 +# The loopback network interface
 +auto lo
 +iface lo inet loopback
 +
 +# The primary network interface
 +allow-hotplug eth0
 +auto eth0
 +iface eth0 inet static
 +address 172.16.1.84
 +netmask 255.255.255.0
 +gateway 172.16.1.1
 +</​code>​
 +===dns===
 +edit /​etc/​resolve.conf
 +<​code>​
 +nameserver 208.67.222.222
 +nameserver 208.67.220.220
 +</​code>​
 +
 +======sudo user setup======
 +<​code>​
 +apt-get install sudo
 +</​code>​
 +<​code>​
 +usermod -a -G sudo example_user
 +</​code>​
 +====disable ssh timeout====
 +edit /​etc/​ssh/​sshd_config
 +<​code>​
 +ClientAliveInterval 60
 +</​code>​
 +
 +then run sudo service ssh restart
 +
 +====updates====
 +<​code>​apt-get update</​code>​
 +<​code>​apt-get upgrade</​code>​
 +
 +====add users====
 +<​code>​adduser $theUser --home /​home/​$theUser \</​code>​
 +<​code>​--shell /bin/bash \
 +--ingroup $theUser</​code>​
 +<​code>​usermod -a -G sudo $theUser</​code>​
 +
 +(on local machine)
 +<​code>​ssh-keygen</​code>​
 +<​code>​scp ~/​.ssh/​id_rsa.pub example_user@SERVER.URL:</​code>​
 +(back on the server)
 +<​code>​mkdir .ssh</​code>​
 +<​code>​mv id_rsa.pub .ssh/​authorized_keys</​code>​
 +<​code>​chown -R EXAMPLEuser:​EXAMPLEuser .ssh; chmod 700 .ssh; chmod 600 .ssh/​authorized_keys</​code>​
vps_setup.txt · Last modified: 2016/07/23 08:56 (external edit)