Setting a brand new vps


yxjxx's blog
, in 14 July 2014

Assume the ip address is, the username is yxj

  1. ssh root@
  2. addgroup admin
  3. useradd -d /home/yxj -s /bin/bash -m yxj
  4. passwd yxj
  5. usermod -a -G admin yxj
  6. sudo vim /etc/sudoers add a new line yxj ALL=(ALL:ALL) ALL under root ALL=(ALL:ALL) ALL
  7. Test the 6 steps above ssh yxj@
  8. At local Machine ssh-copy-id -i ~/.ssh/ yxj@
  9. At your VPS sudo vim /etc/ssh/sshd_config

Port 24000
PermitRootLogin no
RSAAuthentication yes
PubkeyAuthentication yes
ChallengeResponseAuthentication no
PasswordAuthentication no
UsePAM no

AllowUsers yxj
  1. sudo service ssh restart
  2. At your local Machine vim ~/.ssh/config
Host s1
    User yxj
    Port 24000
  1. sudo apt-get update && sudo apt-get upgrade

After that, you may need…

  1. Quickly deploy shadowsocks
  2. Setting pptp vpn