[paramiko] Exit status on shells

Robey Pointer robey at lag.net
Sun Feb 17 18:21:37 PST 2008


On 28 Jan 2008, at 12:57, Christian Vest Hansen wrote:

> If I create a channel with SSHClient.invoke_shell(), will it then ever
> make sense to read the exit_status or inspect the status_event?
>
> I'm trying to simulate shell access to a server and would like to know
> when I can print the input prompt to the users console.

You won't get an exit status until the shell exits, which generally  
means the user logged out.

When using invoke_shell, the remote shell will believe it's talking to  
a terminal, so it will take care of displaying the input prompt itself.

robey




More information about the paramiko mailing list