Questions tagged [paramiko]

Paramiko is a Python module that implements the SSH2 protocol.

Paramiko is a Python module that implements the SSH2 protocol. It is written entirely in Python and released under the GNU LGPL license.

Links:

2658 questions
1
vote
2 answers

I want to execute multiple commands through a single channel of ssh, implemented using paramiko library.

I need to execute multiple commands(in a specific sequential order) in the same established channel of a switch in a storage network. But every time I use exec_command(command) a new channel is opened and the command is sent to the switch. Since…
1
vote
3 answers

Python interactive ssh client using paramiko

I'm not a programmer, but would like to use Python for automation of some Administrative purposes. The first application after "Hello world" I tried to create is interactive ssh client. I've read some documentation and articles and decided it would…
HFFreeway
  • 19
  • 1
  • 2
  • 9
1
vote
3 answers

Python: Paramiko hangs when trying to execute commands over SSH

I'm fairly new to how Paramiko works, but my main objective is to be able to run automated commands over SSH using Python. I have the following code and I am trying to run a simple ls command to start off with but for some odd reason the code seems…
mrpopo
  • 1,563
  • 2
  • 12
  • 19
1
vote
0 answers

ssh using python and paramiko module

This is my first post and I am very new in python and paramiko. My requirement is to: ssh server1.com ssh from server1 to server2.com ssh from server2 to server3.com run multiple UNIX commands on server3.com like declog, decrypt, scp, grep etc....…
1
vote
2 answers

run remote program with root priviledge using paramiko ssh channel

I want to remotely excute a program tcp_sender with root priviledge ,the following function is for making a ssh connection def connect(hostname): ssh = paramiko.SSHClient() …
misteryes
  • 2,167
  • 4
  • 32
  • 58
1
vote
1 answer

Connecting to multiple hosts via paramiko (SSH) is very slow

I am not a complete newbie to python but I am fairly new and inexperienced. I discovered paramiko recently when I wanted to write a script to automate some package version checking + comparing with our production environment, but each connection…
tsaulic
  • 707
  • 1
  • 11
  • 22
1
vote
1 answer

Using paramiko to send commands to an open shell that has an interactive element

I'm trying to execute a remote script on an Oracle ZFS array. The way they've designed the CLI is that you can send it a javascript "script" via SSH. This script is supposed to have the word "script" in the first line which will invoke a sub-shell…
Chris Matta
  • 3,263
  • 3
  • 35
  • 48
1
vote
1 answer

Code not displaying anything

Can someone please help in finding whats wrong with this code. Its not display anything import paramiko ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy( paramiko.AutoAddPolicy()) ssh.connect('135.279.151.56', username='raft', …
1
vote
1 answer

Execute restricted remote script on ssh connect with local arguments via python paramiko

Well, I have a restricted command association on the remote site authorized_keys file as follows: command="python /usr/share/my_script.py" ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDxiK...... and this script should take parameters. On the local site I…
ScotchAndSoda
  • 3,811
  • 4
  • 34
  • 38
1
vote
1 answer

ftplib retrbinary in paramiko?

I am working on paramiko sftp. Is there any function similar to the ftplib retrbinary function in paramiko? My project already supports ftp and there data is stored in memory using cStringIO and then retrbinary and storebinary are used for accessing…
ramsavi
  • 11
  • 2
1
vote
0 answers

Retaining a reference to channel in python / paramiko

Strange behaviour in Python & paramiko 1.7.7.1. I have a function and a class that have effectively exactly the same code but the class breaks it across 2 methods. The behaviour of the paramiko library is different. The function: opens an ssh…
flend
  • 411
  • 1
  • 4
  • 10
1
vote
0 answers

Launch a background process witk paramiko and python

I'm writing a python code to launch a service in the remote server in background, which means the code does not wait until the process is done (its represent the server) My code now is: server_session =…
nam
  • 3,542
  • 9
  • 46
  • 68
1
vote
3 answers

Automating SSH using Python

I have this 30 virtual machines and I am doing everything manually right now which is a kind of trouble for me. I am trying now to write a script so I can connect to them all automatically and do my desired task. I made a flow diagram of what I…
devoidfeast
  • 829
  • 3
  • 12
  • 22
1
vote
1 answer

paramiko exec_command redirect to a file

I want to capture the screenshot of a remote computer using paramiko. I am using the following code for that import paramiko ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) ssh.connect('10.93.80.63',…
Vinay
  • 470
  • 1
  • 5
  • 18
1
vote
1 answer

waiting forever with paramiko

Possible Duplicate: Running interactive commands in Paramiko I am very new to Python. I am trying to run a batch file on a remote computer with paramiko: import paramiko ssh =…
shaharke
  • 11
  • 1
1 2 3
99
100