In this episode of cyber bytes, we will talk, discuss and demonstrate on how to go ahead and enhance security of SSH server by adding multiple layers of security controls.
OpenSSH server is a widely used secure protocol for managing & administering devices remotely. However, SSH server can be prone to bruteforce attacks by bad actors. To safeguard our #sshserver we deploy multiple layers of security to thwart any bruteforce attacks and limit the access of our #server to authorized personnel only.
We will start off with setting up firewall rules using ufw and setting up default rules for incoming and outgoing traffic.
Next, we setup ufw rules to rate limit incoming traffic to our server.
After setting up firewall rules, we then install fail2ban for ssh server and after installing fail2ban, we configure fail2ban and then we proceed to check if our fail2ban service is stopping bruteforce attacks. We run the tool hydra to test for rate limiting and then after confirming, we see that our IP address was banned by fail2ban and then we unban our IP address and then we setup key based authentication for SSH server.
We generate a public & private key pair from our managing server using the command ssh-keygen and then we push our public key on our cyber-bytes server using the command ssh-copy-id.
After we push our public key, we then disable password based authentication on SSH server and then we add a warning banner on server.
In the next important part, we setup ssh server for 2 factor authentication using google authenticator app. We download and setup the lib pam google authenticator libraries and make changes in the server configuration file, generate QR code and scan the code for our server and set up our server.
Using these techniques, we setup mulitple layer for ssh security and protect our ssh server against bruteforce attacks.
Useful links & Resources ( for more in-depth security settings)
https://www.cyberciti.biz/tips/linux-...
https://www.digitalocean.com/communit...
https://goteleport.com/blog/how-to-ss...
https://upcloud.com/community/tutoria...
https://github.com/google/google-auth...
Links for downloading Authenticator apps
https://apps.apple.com/us/app/google-...
https://play.google.com/store/apps/de...
------------------------------------------------------------------------------------------------------------------
Please like, subscribe and comment your thoughts on the videos. If you like my work, then please do subscribe the channel and share the videos and post your comments.
For all types of cyber security consultations, please visit our website - https://evolutioninfosecure.in
Our Flagship course at udemy.com - Network Security Auditing with nmap
Link - https://www.udemy.com/course/network-...
Contact us for discount coupons.
Follow us on Twitter - EVOLUTIONSEC
------------------------------------------------------------------------------------------------------------------
Video Index
00:00 - 02:09 - Introduction
02:10 - 06:13 - Firewall setup for SSH server
06:14 - 07:28 - Rate limit rules for SSH server with UFW
07:29 - 08:45 - Installing Fail2ban
08:46 - 12:18 - Configuring fail2ban for SSH server
12:19 - 14:46 - Testing fail2ban with hydra
14:47 - 15:32 - Unban IP from fail2ban
15:33 - 17:08 - Setup keybased authentication on SSH server
17:09 - 19:09 - Generate RSA keypair using ssh-keygen
19:10 - 19:55 - Push public key to server
19:56 - 21:52 - Edit ssh configuration file for key based authentication
21:53 - 22:25 - Word of Caution!! Manage your server keys
22:26 - 23:03 - Key based authentication is better than password authentication
23:04 - 24:52 - Add warning banner to SSH server
24:53 - 27:19 - Setup two factor authentication on ssh server using google authenticator
27:20 - 29:02 - Common options for google authenticator explained.
29:03 - 30:13 - Generate QR code and configure in google authenticator
30:14 - 33:17 - Configure pam.d & sshd files to use google authenticator
33:18 - 34:21 - Testing 2 factor authentication ssh server
34:22 - 35:02 - Set session timeout for ssh server
35:03 - 35:50 - Limit access allow users and groups on ssh server
35:51 - 37:04 - Outro and request for comments & subscription
На этой странице сайта вы можете посмотреть видео онлайн Securing SSH server - Protect SSH server using Two - Factor Authentication. длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь CYBER BYTES 15 Февраль 2022, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 258 раз и оно понравилось 17 зрителям. Приятного просмотра!