Skip to content
reverseshell

Glossary

TTY (Pseudo-Terminal)

A terminal interface; upgrading a raw reverse shell to a full TTY restores job control, tab completion, and interactive programs like sudo and vi.

A TTY (teletype, now a pseudo-terminal or PTY) is the terminal interface a normal interactive shell expects. A fresh reverse shell usually lacks one: no job control, no tab completion, no command history, and interactive programs like sudo, ssh, and vi break or hang.

"Upgrading" the shell allocates a real PTY, commonly via:

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

followed by stty raw -echo; fg on your side. Some tools — socat — allocate a PTY automatically. Full steps in upgrading a reverse shell.