@digip This is the payload I have run https://github.com/hak5darren/USB-Rubber-Ducky/wiki/Payload---OSX-Root-Backdoor
It writes a script in a hidden directory that sends out a connection request every so often. In other words reconnecting isn't the problem
I guess the appropriate approach would be set up an SSH server on the machine I am remotely connecting to? Then connect to that from my linux box, rather than continually running the script the payload injected?