Here are a few ways to upgrade a basic shell to a better interactive one !
Use a method depending on what is installed on the remote system
python -c 'import pty; pty.spawn("/bin/bash")'
SHELL=/bin/bash script -q /dev/null
- Then type CTRL+Z ;
stty raw -echo;fgthen
NB: If asked “terminal type”, enter
Also, make sure to use / test with sh, bash, etc. And python, python2, python3, etc.