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
1 answer

Adding exceptions for not recognized error?

I get this error: File "/usr/lib/python2.7/dist-packages/paramiko/client.py", line 286, in connect for (family, socktype, proto, canonname, sockaddr) in socket.getaddrinfo(hostname, port, socket.AF_UNSPEC, socket.SOCK_STREAM): gaierror: [Errno…
Andrius
  • 19,658
  • 37
  • 143
  • 243
1
vote
1 answer

PySFTP connection works but get() fails

I can setup a connection with pysftp but i can not get s.get() to work. The connection works fine: import pysftp s = pysftp.Connection(host="xxx", username="xxx", password="xxx") I can also work with s.chdir("/path/to/target") and show the file i…
bioslime
  • 1,821
  • 6
  • 21
  • 27
1
vote
0 answers

Running multiple processes and IPC using python scripts

I'm working on developing a test automation framework. I need to start three processes(Client, Host adaptor and Host) using python scripts. I'm new to python language. I have a python script which starts the host adaptor and the host. While they…
user1124236
  • 453
  • 2
  • 7
  • 17
1
vote
1 answer

Fabric cannot import paramiko

I've installed paramiko and when I import it in python, it works normally, but I get the following error running fabric: Traceback (most recent call last): File "/Library/Python/2.7/site-packages/fabric/network.py", line 24, in import…
Armita
  • 345
  • 1
  • 12
1
vote
1 answer

Uploading large files to proftpd through paramiko times out

I've set up a SFTP server using proftpd on my local machine. It works fine, except that it times out when uploading files larger than approximately 30000 characters. Uploading from the command line through proftpd works without any problems, and…
1
vote
0 answers

SSHClient() IndentationError: unexpected indent

ssh=paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) ssh.connect('devicenames',22,username=username,password=password) I am getting "IndentationError: unexpected indent" in my python code. I have written this code for…
amit
  • 23
  • 3
1
vote
0 answers

Connect to SSH using paramiko throue TOR

I want know how to add TOR / PROXY to this connection: def check_server(host, user, password, port=22): ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) #FAILED APPROCH #proxy =…
user3818090
  • 123
  • 8
1
vote
1 answer

Valid authorized_keys file?

I have a piece of software I wrote using Python & Paramiko which distributes a public ssh key to a target linux machine. Then it tries to connect using the private key. On one machine (RHEL version 5), it works with no problem. On other machines…
Tal
  • 398
  • 4
  • 19
1
vote
0 answers

paramiko proxycommand with existing tunnel

I'm using a setup where I need to ssh to a server from a client where ssh to the server is restricted to a specific bastion host. I have an existing ssh tunnel set up between the bastion host and the server (using autossh), and I would like to be…
1
vote
2 answers

chown via paramiko by username and not uid

I need to run chown on a certain file on a remote server to change the owner (not the group). The paramiko chown command takes 3 arguments: path, gid, uid. In my code, I have the username, not the uid. So this is my code: #some code…
Tal
  • 398
  • 4
  • 19
1
vote
1 answer

Opening more pipes over Paramiko Channel

When connecting to a ssh server via Paramiko, reading the stdios is very easy when using SSHClient. client = paramiko.SSHClient() client.load_system_host_keys() client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) client.connect('127.0.0.1',…
tMC
  • 18,105
  • 14
  • 62
  • 98
1
vote
2 answers

python paramiko error in Django: 'str' object has no attribute 'get_name'

So I've heard that it's an incredibly bad idea to host media on the same server as your Django/Apache web framework. So to solve this problem with my iOS app and greatly improve server side performance in the long run would be to upload the images…
Matt Andrzejczuk
  • 2,001
  • 9
  • 36
  • 51
1
vote
0 answers

Paramiko 2 tier cisco SSH

I am attempting to write a python script to SSH into a cisco device to run a list of commands using the paramiko module. The tricky part here is that it has 2 levels of authentication where I will log in intially with a primary password then enable…
peterpod
  • 246
  • 1
  • 3
  • 11
1
vote
1 answer

Python 2.6 -- paramiko import error

I have some scripts that run every 30 minutes in cron that import paramiko. Seemingly at random, I will get one of these two errors during import: Traceback (most recent call last): ... File "build/bdist.linux-x86_64/egg/paramiko/__init__.py",…
Valdogg21
  • 1,151
  • 4
  • 14
  • 24
1
vote
2 answers

Paramiko ssh output stops at --more--

The output stops printing at --more-- any idea how to get the end of the output >>> import paramiko >>> ssh = paramiko.SSHClient() >>> ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) >>> conn=ssh.connect("ipaddress",username="user",…
Anesh
  • 194
  • 1
  • 13