ssh session as python subprocess takes input but does not print it to stdout -
i'm trying use python's cmd library create shell limited commands. 1 requirement have able run command executes existing shell script opens ssh session on remote machine , there allows user interact remote shell if regular ssh session. simply using subprocess.popen('[/path/to/connect.sh]') works @ least starting point except 1 issue. can interact remote shell input type not shown on stdout...so example see prompt on stdout when type 'ls' don't see being typed when hit return works expected. i'm trying wrap head around how print input stdout , still send along remote ssh session. edit: actual code without using cmd 1 line: ssh_session = subprocess.popen(['connect.sh']) it fired do_* method in class extended cmd.cmd. think may end using paramiko still interested in anyone's input on this. assuming using unix system, ssh detects if on terminal or not. when detects not on terminal, when using subprocess, not echo charac...