How can I audit users and access attempts to SSH on my server?

RadiantHex

I've had a few security problems with a server of mine, a few SSH users have been setting up fires aka giving problems.

I would like to:

  • Track user logins and logouts
  • Track activity of these SSH, in order to discover any malicious activity
  • Prevent users from deleting logs

I am not much of a sys admin and I am quite inexperienced in this matter, so any kind of advice would be very welcome and very helpful. :)

Javier Rivera

Since we're talking about SSH servers, I will give you command line solutions.

  • Track user logins and logouts. That's easy, the file /var/log/auth.log should have this information.

  • Track activity of those users: If they are fairly innocent, you can check the file .bash_history in their home dir. You will see a list of the commands that they executed. The problem is of course that they can delete or edit this file.

  • Prevent users from deleting logs: Users shouldn't be able to touch auth.log. In order to stop them from playing with .bash_history you need to do a couple of tricks.

  • What if the user manages to obtain root access? : You're screwed. Unless they make a mistake they will be able to hide all their footsteps.

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

How can I reach a remote ssh server through my http proxy (80 port)?

분류에서Dev

How can I find my DHCP server?

분류에서Dev

How can I find my DHCP server?

분류에서Dev

How can I tell how many bits my ssh key is?

분류에서Dev

How can I allow access to both SSH and SFTP?

분류에서Dev

How can I access my models in sailsjs outside a controller?

분류에서Dev

How can I configure such that I can always SSH to my system over the internet on a dynamic IP?

분류에서Dev

How can I work on files on my server and keep them in sync?

분류에서Dev

How can I work on files on my server and keep them in sync?

분류에서Dev

How can I force the X server to use my nvidia card?

분류에서Dev

Can't access my xampp server remotely

분류에서Dev

Can I use the access token directly from FB.login on my server?

분류에서Dev

Was my SSH server compromised? If so, how, and what steps should I take?

분류에서Dev

How do I set up SSH to transfer files from my local machine to a shared server with rsync?

분류에서Dev

How to audit TTY for a specified user in ssh connection?

분류에서Dev

Can malware access my passwords? How do I keep my accounts safe if they did?

분류에서Dev

How can I preset aliases for all users?

분류에서Dev

My External Hard Drive fell and I cannot access storage anymore. How can I fix it?

분류에서Dev

How do I set up a server for SSH?

분류에서Dev

Can I hack people connecting to my server?

분류에서Dev

How can I access the heart rate sensor on my galaxy s5 using the standard apis?

분류에서Dev

How can I create multiple SSH keys?

분류에서Dev

How can I accept all SSH requests?

분류에서Dev

How Can I Regenerate SSH Keys?

분류에서Dev

How can I run glances over ssh?

분류에서Dev

How can I pause a loop until I get a users input?

분류에서Dev

How to only allow access to web server through SSH?

분류에서Dev

How can I access a SQL Server database with . in name via set-location

분류에서Dev

How can I insert a record retrieved from an ms access table into an sql server table?

Related 관련 기사

  1. 1

    How can I reach a remote ssh server through my http proxy (80 port)?

  2. 2

    How can I find my DHCP server?

  3. 3

    How can I find my DHCP server?

  4. 4

    How can I tell how many bits my ssh key is?

  5. 5

    How can I allow access to both SSH and SFTP?

  6. 6

    How can I access my models in sailsjs outside a controller?

  7. 7

    How can I configure such that I can always SSH to my system over the internet on a dynamic IP?

  8. 8

    How can I work on files on my server and keep them in sync?

  9. 9

    How can I work on files on my server and keep them in sync?

  10. 10

    How can I force the X server to use my nvidia card?

  11. 11

    Can't access my xampp server remotely

  12. 12

    Can I use the access token directly from FB.login on my server?

  13. 13

    Was my SSH server compromised? If so, how, and what steps should I take?

  14. 14

    How do I set up SSH to transfer files from my local machine to a shared server with rsync?

  15. 15

    How to audit TTY for a specified user in ssh connection?

  16. 16

    Can malware access my passwords? How do I keep my accounts safe if they did?

  17. 17

    How can I preset aliases for all users?

  18. 18

    My External Hard Drive fell and I cannot access storage anymore. How can I fix it?

  19. 19

    How do I set up a server for SSH?

  20. 20

    Can I hack people connecting to my server?

  21. 21

    How can I access the heart rate sensor on my galaxy s5 using the standard apis?

  22. 22

    How can I create multiple SSH keys?

  23. 23

    How can I accept all SSH requests?

  24. 24

    How Can I Regenerate SSH Keys?

  25. 25

    How can I run glances over ssh?

  26. 26

    How can I pause a loop until I get a users input?

  27. 27

    How to only allow access to web server through SSH?

  28. 28

    How can I access a SQL Server database with . in name via set-location

  29. 29

    How can I insert a record retrieved from an ms access table into an sql server table?

뜨겁다태그

보관