Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a problem where after closing the ssh access for root I have a lot of failed login attempts. Any idea how can I find what is causing this?
[myuser@mycomputer ~ ]$ su -
Password:
Last login: Tue Sep 14 06:01:53 +03 2021 on pts/6
Last failed login: Tue Sep 14 06:03:14 +03 2021 from mycomputer on ssh:notty
There were 48 failed login attempts since the last successful login.
[myuser@mycomputer ~ ]$ su -
Password:
Last login: Tue Sep 14 06:03:16 +03 2021 on pts/4
Last failed login: Tue Sep 14 06:07:00 +03 2021 from mycomputer on ssh:notty
There were 116 failed login attempts since the last successful login.
I figured 'ps -elf|grep root', but I'm not sure if that is the only way to find out.
So I should check network traffic for example with nestat -natpe? Im not rly sure what the user id refers to though.. i suppose its the one from passwd file?
And do you think the ps -elf is relevant for information?
On most systems authentication events including destination port are logged in /var/log/auth.log and you can try to find which process is accessing this port
If you have allowed internet access to the computer using ssh and allow ssh passwords it is someone trying to brute force there way in. Hopefully, root ssh root login is disabled. They will eventually move on. Make sure you are using strong passwords or better yet only use keys. To slow them down some you can use fail2ban.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.