Create User
Create New SSH User and add to Sudoers File
This will create the user, setup the password and open up the sudoers file for editing.
$ useradd <username>
$ passwd <username>
$ vi /etc/sudoers
Add your new user below the line where the “root” user is defined.
root ALL=(ALL) ALL
<username> ALL=(ALL) ALL
Setup Public/Private Key Pair
This is optional, but is a good idea.
@see http://wiki.centos.org/HowTos/Network/SecuringSSH#head-9c5717fe7f9bb26332c9d67571200f8c1e4324bc
Add a Little Security
Use a Non-Standard Port
Port 22 and 2222 are some of the most commonly used. Try something else, especially something higher than 1024. Yes, this is just a little security by obscurity, but it helps cut down on a lot of attacks. Just don’t get too complacent thinking this will solve all your hacking issues.
Edit /etc/ssh/sshd_config and add a line like this…
# Run ssh on a non-standard port:
Port 2345 #Change me
Restart sshd service…
$ service sshd start
@see http://wiki.centos.org/HowTos/Network/SecuringSSH#head-3579222198adaf43a3ecbdc438ebce74da40d8ec
Next Steps
- Setup a LAMP Stack on CentOS
- Install git…
sudo yum install git
- Install unzip…
sudo yum install unzip
- Change your hostname
- Anything else that suits your fancy