I'm a complete beginner and I'm looking for some help.
I need to automatically start a command / script at boot to listen for a port from Netcat on computer with Raspbian Desktop version.
If I open the terminal from this computer and manually add the command like "nc -vklp 5555 | /bin/bash", it works fine and from another computer I can access and start a script, for example "echo sudo ./test.sh | nc 192.168.1.50 5555".
If instead I try to set the computer start listening to Netcat automatically at boot by modifying 'etc/rc.local" and adding "nc -vklp 5555 | /bin/bash" before "exit0", it doesn't work. Says port already in use and not working / not communicating. I have to disable it from "etc/rc.local".
Basically, I have to start Terminal and add the command manually to listen for Netcat otherwise it doesn't work.
Could someone tell me what I'm doing wrong?
Thank you !!!
Ps: apologize for my bad English