Sunday, April 24, 2011

Initial SSH setup

Create User ID for normal use

  • On Debian, useradd is a low level utility for adding users. Administrators should usually use adduser(8) instead.
  • On Fedora or CentOS systems, adduser is just a symbolic link to useradd
  • adduser <user>

Change SSH port and deny root SSH login

  • vi /etc/ssh/sshd_config
  • Replace default port 22 with <random port>
  • Disable Root login   PermitRootLogin no
Enable new SSH port on ipchains
  • iptables -A INPUT -p tcp --dport <new SSH port> -j ACCEPT

Restart SSH service

  • service ssh reload

No comments:

Post a Comment