Twitter

vps


  • user
    • adduser fouda
    • visudo
    • fouda ALL=(ALL) ALL
    • esc => ZZ
  • SSH
    • mkdir /home/fouda/.ssh
    • === on local machine ===
      • scp -2 /Users/N0v8v/.ssh/id_rsa.pub root@50.115.167.22:/root/.ssh/authorized_keys
    • cp /root/.ssh/authorized_keys /home/fouda/.ssh/authorized_keys
    • chown -R fouda:fouda /home/fouda/.ssh
    • chmod go-w /root/
    • chmod 700 /root/.ssh
    • chmod 600 /root/.ssh/authorized_keys
    • chmod go-w /home/fouda/
    • chmod 700 /home/fouda/.ssh
    • chmod 600 /home/fouda/.ssh/authorized_keys
    • vi /etc/ssh/sshd_config
      • Port 3017 <--- change to a port of your choosing
      • Protocol 2
      • PermitRootLogin no
      • PasswordAuthentication no
      • X11Forwarding no
      • UsePAM no
      • UseDNS no
      • AllowUsers fouda
  • iptables
    • iptables-save > /etc/iptables.up.rules
    • iptables -L
    • wget https://sites.google.com/site/anssary/vps/iptables.test.rules
    • mv iptables.test.rules /etc/iptables.test.rules
    • iptables-restore < /etc/iptables.test.rules
    • iptables -L

No comments:

FaceBook Stream