[paramiko] remote command info
stefano landucci
marlonbasta at gmail.com
Wed Jan 27 13:05:19 PST 2010
2010/1/27 Roman Yakovenko <roman.yakovenko at gmail.com>
>
> In Linux, there are few commands that have an option to change working
> directory. For example "tar" has "--directory" option that will change
> pwd for that process. May be you the commands you need to use have
> such option too.
>
> Another valid option could be to generate a shell script, upload it to
> a temporal directory and execute it.
>
I want use the paramiko library for manage CISCO device (I test the code on
linux machine).
In my first test I wrote:
i, o, e = client.exec_command('command'+'command_1'+'command_2')
but the CISCO devices have a limited buffer and I can't put all command in a
only one time.
I tested that solution:
client.exec_command('cd /etc')
i, o, e = client.exec_command('ls')
print o.read()
but the output is only a ls print of my home directory and not of /etc
directory.
There is a method to implement my issue.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lag.net/pipermail/paramiko/attachments/20100127/66b9894e/attachment.html>
More information about the paramiko
mailing list