Hey everyone! I'm looking for guidance on how to change the SSH port on my EC2 instance to improve its security. Any tips or steps would be much appreciated. Thanks in advance!
4 Answers
Instead of SSH, you might want to use the Session Manager for added security. If you really want to change the port, just remember to edit /etc/ssh/sshd_config to change the port.
Changing the SSH port doesn't necessarily harden your instance. A better approach is to block access from outside and consider using a VPN, or enable the port only when you need it.
Using Session Manager is definitely a safer bet than SSH in many cases. If you're fixated on changing the port, make sure you can access the modified port in your security groups.
I recommend blocking external access completely and using solutions like Tailscale. It's a great way to manage connections securely without exposing SSH.
Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures