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

paramiko with Cisco ASA

Does somebody try to use Paramiko to connect to Cisco ASA? I use the following script: import sys import os import paramiko paramiko.util.log_to_file("ssh_conn.log") ssh_client = paramiko.SSHClient() print ('client…
vedburtruba
  • 1,089
  • 1
  • 9
  • 10
1
vote
1 answer

Logging into a Cisco Wireless Controller via SSH

I have a working python script that will log into a cisco device (router/switch) and pull whatever information you want from it. I am now working on doing the same for a cisco wlc, however to ssh into a wlc it requires a 'login as' name along with…
JMarks
  • 51
  • 1
  • 7
1
vote
1 answer

Fabric connection to EC2 instance fails with Paramiko ValueError

I'm trying to connect to an EC2 instance using fabric (in python). I've set my env variables as so: env.hosts = ['xxx-xxx.amazonaws.com'] env.user = "ubuntu" env.key_filename = ['/path/to/my/ec2.pem'] the command run('pwd') gives the following…
Harlo Holmes
  • 5,145
  • 1
  • 23
  • 20
1
vote
0 answers

Call linux ssh client with password through paramico connection

I am trying to connect to a Linux box using paramiko and from that session execute an ssh session to establish a reverse tunnel to another machine. Using keyfiles works fine, but it's not an actual option, and connecting to the other box to…
1
vote
0 answers

Cannot run paramiko-expect on windows

I get following error when ran on windows - Traceback (most recent call last): File "demo2.py", line 5, in from paramikoe import SSHClientInteraction File "C:\Python27\lib\site-packages\paramikoe.py", line 17, in import…
Piyush Jajoo
  • 1,095
  • 2
  • 18
  • 27
1
vote
0 answers

how to install and compile prycropto-2.6.1 in remote system

How could I install and compile prycropto-2.6.1 in a remote system.I have no clue.Please help .I have tried the below code. easy_install-2.6.1 pip pip-2.6.1 install pycrypto But the above code is not working. It returns"easy_install-2.6 pip"…
swarup...
  • 65
  • 1
  • 9
1
vote
1 answer

Modifying paramiko output before storing it in an array

I have a requirement to log into multiple devices,run multiple commands and store the output.I am currently achieving this using paramiko for remote SSH and then storing the results in an excel sheet using xlswriter. This is the code that I…
Amistad
  • 7,100
  • 13
  • 48
  • 75
1
vote
1 answer

Paramiko not returning prompt after exception (Python 3)

Python 3.3 on RHEL 6. With the code below, if I get the password right the first time, it correctly prints 'authenticated', then returns me to my shell. If I get the password wrong 3 times it correctly prints 'Too many tries, sorry.', then returns…
user3449833
  • 779
  • 2
  • 10
  • 28
1
vote
1 answer

ssh command with argument execution in python

I need to execute a ssh command with arguments in python. I have been able to execute the ssh command.But, I cannot figure out, how to pass the arguments. The command: ssh -L 22222:localhost:5434 sayan@155.97.73.252 Here is the code : ssh =…
user2284140
  • 197
  • 1
  • 4
  • 18
1
vote
1 answer

Command execution using paramiko

I am working on a python script which accepts a command to execute on remote linux. I surfed and found Paramiko. I developed a script which works fine if command like 'who', 'ps', 'ls' is executed. But the same script failed to execute 'top' and…
user3487421
  • 11
  • 1
  • 3
1
vote
0 answers

python paramiko module error with callback

I'm trying to use the paramiko module to copy a (big) file in my local network, and get the output to display a GtkProgressBar. A part of my code is: ... NetworkCopy.pbar.set_text("Copy of the file in the Pi...") while…
Guillaume
  • 2,752
  • 5
  • 27
  • 42
1
vote
1 answer

Paramiko - Remote command execution

On execution some of the commands Paramiko returns fine. For a particular set command that runs on remote shell , the execution hangs and on killing the process i capture the following error. Exception executing the tests Traceback (most recent call…
Sujay
  • 9
  • 3
1
vote
0 answers

source command does not take effect

I have a cluster of machines, and I write a Python script to change the hostname; the code follows. What puzzles me is that the source command only takes effect on some machines, not all. After I repeat several times, then all hostname take effect…
Djvu
  • 605
  • 1
  • 5
  • 18
1
vote
0 answers

How to get complete output from remote command execution using paramiko

I am trying to learn executing command on remote system using python paramiko code. I am receiving partial output of length 12519 characters. How can I get complete result of length 12550 or more? Here is the code, this is a code taken from a…
tintin
  • 23
  • 4
1
vote
1 answer

File not found while using paramiko.ProxyComand

I have this part of the code of my file cpe_scan.py: import Crypto import paramiko def runSshCmd(hostname, username, password, cmd, timeout=5): conf = paramiko.SSHConfig() conf.parse(open('/home/me/.ssh/config')) host =…