I am using spyder on ubuntu 16.04. I want to write a script that will execute several commands in the same linux terminal.

First I want to open a terminal, then ssh into another computer, then enter my password, then continuing entering commands.

I have tried `os.system(command)` but this does not open a new terminal for me nor run the command I want.

`os.system("gnome-terminal -e 'bash -c \"ssh blah blah blah; exec bash\"'")`
 works but I am stuck when trying to enter my password.

How can I enter commands with a Python script in this context?