@nixcraft recently posted a great tutorial about how to audit an SSH server at cybercity.biz/tips/how-to-audit-ssh-server-and-client-config-on-linux-unix.html
The reason for this post is to help anybody who crosses the same problem that I did. I tried to leave a comment and the server kept on rejecting it.
Here is the problem I found wiht the tutorial, easy to fix, may be Vivek will add this to it.
sudo awk ‘$5 >= 3071’ /etc/ssh/moduli > /etc/ssh/moduli.safe
-bash: /etc/ssh/moduli.safe : Permission denied
Doesn’t work in Ubuntu 20.04 with everything upgraded to 6-3-2021 12: noon
- if you don’t want to create a root password, do
sudo awk ‘$5 >= 3071’ /etc/ssh/moduli
then highlight all the output in the screen from:
to the end of the file, then right click and copy the content to the clipboard.
sudo nano /etc/ssh/moduli.safe
and do a right click and paste into the file, after that s followed by x.
from there follow the tutorial as is.
didn’t follow this path, so you may need to change some permission on this file created with the editor, please comment here if you have to.
- if you decided to create a root password (be aware there’re dangers to this),
and then enter your password if asked, followed by the desired root password and confirm it.
and enter the root password!
Success, now you are in real dangerous territory, you can do anything…