Answer the question
In order to leave comments, you need to log in
How to get text from terminal using python?
On the site you need to display all the information from the terminal, which appears if you run tmux attach on the server.
What is the best way to do this? I tried the Paramiko module, but writes:open terminal failed: not a terminal
Answer the question
In order to leave comments, you need to log in
The problem needs to be solved in a different way. What is run in tmux should be run with output to a file. And display the result of parsing this file on the site. The file itself can be taken via ssh with a key, or you can run the tail command remotely:
ssh -i my_id_rsa_key [email protected] tail /tmp/script.log
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question