0

So I have a friend who had an ssh server running on his Raspberry Pi (This question isn't a problem specific to RPi, so that's why I'm posting here). I logged in over ssh, and ran :(){ :|: & };:, as a joke. He texted me and asked me what I did, and why his Pi was lagging so bad, and I told him and he sent back the laughing emoji. He asked how to fix it, so I told him to reboot. He did and told me that it was still lagging, but he had a minute or so before it froze up again. I did not know that the fork bomb would persist after a reboot. He has managed to (kinda) fix this. I just asked him what he did, and he replied with "First I tried ulimit, that had minimal effectiveness. Then, I ran a while loop from terminal that killed the process every second." I have no idea how he got the process name to kill.

So the problem is that even though there is a script running to kill the processes every second, his Pi keeps jumping off of the network. I don't know why this is happening. How can we completely eradicate the fork bomb?

(By the way, he is not mad at me [That I know of], and he has said he is not mad)

tylerr147
  • 101
  • 1

1 Answers1

0

We are pretty sure it is not the fork bomb causing this. If he has 60 seconds, then there are a lot of things it is possible to run.

I would do:

terminal1$ wssh rpi-server cat /var/log/syslog > rpi-syslog
terminal2$ wssh rpi-server tail -f /var/log/syslog
terminal3$ wssh rpi-server top
terminal4$ wssh rpi-server dmesg

(wssh waits for the port to open, and runs SSH immediately, so you get in ASAP. It uses w4it-for-port-open and nc: https://gitlab.com/ole.tange/tangetools/tree/master/w4it-for-port-open https://gitlab.com/ole.tange/tangetools/tree/master/wssh)

Ole Tange
  • 33,591
  • 31
  • 102
  • 198