On Wed, Jan 27, 2010 at 6:33 PM, james bardin wrote:
> On Wed, Jan 27, 2010 at 11:14 AM, stefano landucci
> wrote:
>>
>> Ok.
>>
>> I find the example below:
>>
>> i, o, e = client.exec_command('cd /etc')
>>
>> i.write('ls\n')
>> i.flush()
>>
>> I test it, but don't work.
>> Waht do you think abou
2010/1/27 Roman Yakovenko
>
> 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 t
On Wed, Jan 27, 2010 at 11:14 AM, stefano landucci
wrote:
>
> Ok.
>
> I find the example below:
>
> i, o, e = client.exec_command('cd /etc')
>
> i.write('ls\n')
> i.flush()
>
> I test it, but don't work.
> Waht do you think about it?
>
It won't work, because there's no shell running on the other
2010/1/27 james bardin
> The short answer is, you don't.
> Run your commands separately with exec_command(), and remove their
> dependencies on one another, and you will be much happier.
>
>
Ok.
I find the example below:
i, o, e = client.exec_command('cd /etc')
i.write('ls\n')
i.flush()
I tes
On Tue, Jan 26, 2010 at 5:20 PM, stefano landucci wrote:
> Hi,
>
> I'm a paramiko's newbie. I started with a simple ssh connection and command
> execution like below:
>
> import sys
> import paramiko
>
> client = paramiko.SSHClient()
> client.load_system_host_keys()
> ip = 'ip_server'
> client.set
Hi,
I'm a paramiko's newbie. I started with a simple ssh connection and command
execution like below:
import sys
import paramiko
client = paramiko.SSHClient()
client.load_system_host_keys()
ip = 'ip_server'
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
client.connect(ip,port=22,