Skip to content

Instantly share code, notes, and snippets.

@rudSarkar
Last active May 30, 2020 17:42
Show Gist options
  • Save rudSarkar/f0f5135897e39d48fa75e59fdea9aa3a to your computer and use it in GitHub Desktop.
Save rudSarkar/f0f5135897e39d48fa75e59fdea9aa3a to your computer and use it in GitHub Desktop.

Spawning bash with python:

$ python -c 'import pty; pty.spawn("/bin/bash")'

If python not installed, I use it and it's works like killer

/usr/bin/script -qc /bin/bash /dev/null

Background'ing the remote shell with CTRL-Z:

root@remote:~$ ^Z
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment