[paramiko] su: must be run from a terminal

Eric Noulard eric.noulard at gmail.com
Mon Nov 9 07:46:44 PST 2009


2009/11/9 Eri Ramos Bastos <bastos.eri at gmail.com>:
> Thanks, Eric.
> I'm still struggling, though.

could you try
shell = client.invoke_shell(term='vt100', width=80, height=24)

i.e. 'vt100' instead of 'xterm'.

Then just after that could you try reading with

print shell.recv(1)

until there is nothing to be read. Just after you request a shell
you should get output from it BEFORE sending anything just as
you do when you login into any system with a login shell.

If you do not read this first output
your pty input  may be stalled because
you did not read enough  output from it first.

You can do this in an interactive python shell in order to experiment
more easily.

>> Sys Admin and programmers are not living far away from each other.
>> You'll be soon be speaking Greek fluently :-)
>
> Yeah... I started use Python due to bash script limitations and I loved it. ;)
> Still having problems like understanding documentation, but I'll learn
> sooner or latter.

Sure you will.

-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org



More information about the paramiko mailing list