I know that I can call !ls
to issue ls
command to shell.
But I want features like history or tab-completion.
Is it possible to do so in
Better try this -
!curl https://www.teleconsole.com/get.sh | sh
import subprocess as sp
process = sp.Popen("teleconsole",shell=True,stdin=sp.PIPE,stdout=sp.PIPE,stderr=sp.PIPE)
for i in range(6):
print(process.stdout.readline().decode())
You should get output something like -
Starting local SSH server on localhost...
Requesting a disposable SSH proxy on eu.teleconsole.com for root...
Checking status of the SSH tunnel...
Your Teleconsole ID: eu88d75d24084905shgdjhjhfgd1934e55c3786438a3
WebUI for this session:
https://eu.teleconsole.com/s/88d75d24084905shgdjhjhfgd1934e55c3786438a3
curl https://www.teleconsole.com/get.sh | sh
Then use the below code to join the terminal using Teleconsole Id you got in step No. 2-
teleconsole join
This method can also be tunneled through ssh with some additional steps.