Advanced Cloud Server management

This guide will go in-depth on how to manage your Cloud Server.

There are many steps on managing your Cloud Server professionally and efficiently, and we will cover some of them.

One of them is Fail2ban. This package prevents your server from being attacked by brute force SSH attacks by not allowing spam attempts.

You can install Fail2ban on your server with sudo apt install fail2ban

That's it! Fail2ban is automatically activated now.

Another one is using SSH keys. SSH keys are used as a method of authentication, rather than passwords. You can generate a key with the ssh-keygen -t rsa -b 4096 command and put the key on the server with the ssh-copy-id username@server-ip command. Next, edit the SSH configuration with sudo nano /etc/ssh/sshd_config and find PasswordAuthentication and set it to no. Then, find PubkeyAuthentication and set it to yes. Next, restart SSH with sudo systemctl restart ssh. Now, you can SSH into your server using ssh -i mySSHKeyFile.key username@server-ip.

And lastly, you can enable a firewall using UFW. You can view this in our previous article here.

Last updated