Skip to content

Install and configure SSH server to be safer.

Good night,

To install ssh server in Ubuntu use:

$ sudo apt-get install openssh-server

To let it safer edit /etc/ssh/sshd_config

$ sudo vi /etc/ssh/sshd_config

Than change the lines:

AllowUsers USER
AllowGroups GROUP_USER
PasswordAuthentication yes
MaxStartups 2:100:2
Port XXX # Change the port

What MaxStartups do? Specify the number of un authenticated connections in server. The syntax is start:percent:max. Example: 10:50:20. When it gets to 10 connections it will start with the percent. So every new connection will have 50% of chance to be automaticlly refused. When it gets to 20. It will denied ALL the new connections.

If you want, you can ask for a second password, if you type it wrong, it will close the connection:

Edit /home/user/.profile

echo Put your password
read senha
if [ $senha == “SOMETHING” ]
then
# CODES THAT ALREADY ARE AT .profile
else
exit
fi

With this you can do some tricks, to create a new RANDOM password every time somebody connect and send it to your e-mail. So you will need to put your normal password, than access your e-mail account, verify the new password and type it.

Best Regards,
Matheus

References:
Desabilitar Comando SU
Informação MaxStartups

Published inLinuxShell Script

159 Comments

  1. I am not sure where you are getting your info, but great topic. I needs to spend some time learning more or understanding more. Thanks for great info I was looking for this information for my mission.

  2. Whoa! This blog looks just like my old one! It’s on a entirely different subject but it has pretty much the same page layout and design. Excellent choice of colors!

  3. DichaelTiemi DichaelTiemi

    Hi there I am so happy I found your webpage, I really found you by error, while I was looking on Askjeeve for something else, Regardless I am here now and would just like to say kudos for a tremendous post and a all round entertaining blog (I also love the theme/design), I don’t have time to browse it all at the minute but I have bookmarked it and also added your RSS feeds, so when I have time I will be back to read a great deal more, Please do keep up the superb jo.
    Watch sexual porno video xxx sex adults site

  4. https://888starz.net.co/
    888Starz Colombia es una plataforma de casino online y casa de apuestas que reune mas de 9.500 juegos, abarcando maquinas tragamonedas, ruletas y mesas con croupier real y una completa cobertura de eventos deportivos que abarca desde la Liga BetPlay hasta la Champions League y esports.

  5. Stephenunurn Stephenunurn

    Right here is the right webpage for anybody who wishes to understand this topic. You realize a whole lot its almost tough to argue with you (not that I actually would want to…HaHa). You definitely put a brand new spin on a subject that has been discussed for many years. Excellent stuff, just wonderful!
    Xxx video onlyfans sex video site

  6. EarnestCot EarnestCot

    I think that what you wrote made a lot of sense. However, consider this, what if you wrote a catchier post title? I mean, I don’t wish to tell you how to run your blog, however suppose you added something that grabbed a person’s attention? I mean %BLOG_TITLE% is a little plain. You ought to glance at Yahoo’s front page and watch how they create news titles to grab viewers to open the links. You might add a video or a picture or two to get people interested about everything’ve written. Just my opinion, it might bring your posts a little livelier.
    Timothy Malmros Genach

  7. LewisJonus LewisJonus

    Good day I am so thrilled I found your webpage, I really found you by error, while I was browsing on Askjeeve for something else, Anyhow I am here now and would just like to say cheers for a remarkable post and a all round interesting blog (I also love the theme/design), I don’t have time to read it all at the minute but I have book-marked it and also added your RSS feeds, so when I have time I will be back to read a great deal more, Please do keep up the awesome b.
    https://ital-parts.com.ua/chomu-na-santa-fe-shvydko-zhovtiie-korpus.html

  8. Casino vavada zyskuje pozytywne opinie dzięki różnorodnej ofercie obejmującej sloty, gry stołowe oraz turnieje z evolution gaming. Kasyno online oferuje bonus powitalny, darmowe spiny i bonusy oraz kody promocyjne dla nowych graczy. Obsługa klienta gaming działa sprawnie, a gracze mogą wziąć udział w promocjach dostępnych na vavada pl.

Leave a Reply

Your email address will not be published. Required fields are marked *