The shell obtained with nc is basic. It is not a tty (real terminal).
Some commands like su will refuse to work.
To upgrade our shell, use python to get a tty shell:
python -c 'import pty; pty.spawn("/bin/bash")'
The shell obtained with nc is basic. The completion with Tab, the history with arrows are not managed.
Put the nc in the background with:
Then ask the current shell to pass the raw keystroke codes to the remote shell, and switch back to the netcat (foreground)
stty raw -echo fg
Disclamer: Trying this in a browser will just freeze the shell. The browser also modifies the key codes. It only works in a VM