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
0 answers

OpenSSH host-matching rules not honored in paramiko

I read this, says 'with more specific hostmasks taking precedence', but when I tried, the output is not what the documentation says: >>> from paramiko.config import SSHConfig >>> ssh_config = SSHConfig() >>>…
schemacs
  • 2,783
  • 8
  • 35
  • 53
1
vote
1 answer

Using Paramiko to ssh in and run a command then have the print out parsed

I am writing a script to ssh into a device with Paramiko, run a command and parse the output from that command. I have played with a few parsers and it seems to get hung up. Here is the code for me to ssh in: SSH import paramiko client =…
tjoenz
  • 699
  • 5
  • 14
  • 39
1
vote
1 answer

Multithreading ssh with paramiko

I'm new to python and I am trying to accomplish a multithreaded ssh session with paramiko. def worker: ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) ssh.connect(host, username='root',…
user3157494
  • 11
  • 1
  • 2
1
vote
0 answers

paramiko execute multiple commands with blocking

I am using client.exec_command to run several commands consecutively but seems it's non-blocking. Sometimes I want to wait for a command to finish before running the next one. I know I can utilize a channel's API chan.exec_command and wait on it's…
Derek
  • 1,085
  • 2
  • 20
  • 36
1
vote
1 answer

paramiko and python ssh

I am trying to connect setup a ssh connection with a host machine. Here is my code: def make_connection_paramiko(Username, Password): ssh = paramiko.SSHClient() hostname = "username@hobbes.cs.ucsb.edu" …
Ameya Savale
  • 431
  • 1
  • 8
  • 21
1
vote
1 answer

Getting WindowsError when trying ot copy a file from one directory to another w/ paramiko

Good afternoon, I am getting the following error whenever I am trying to copy a test file from one directory to another on a remote server: Traceback (most recent call last): File "", line 1, in File…
Chris
  • 569
  • 2
  • 8
  • 15
1
vote
1 answer

tkinter gui freezes when function fails

Background: To get practice I'm writing an application for work that will allow help desk users to grep | tail logs without requiring them to perform SSH/terminal work. These users are running on windows machines otherwise I'd use subprocess. Some…
Tim
  • 13
  • 3
1
vote
1 answer

Implement timeout for paramiko with an interactive element

This question is a followup to this question: Using paramiko to send commands to an open shell that has an interactive element so please read that before answering here. I'm successfully able to send data to the array's system shell, however I need…
Chris Matta
  • 3,263
  • 3
  • 35
  • 48
1
vote
2 answers

Small library for remote command execution similar to Fabric

I currently have my own set of wrappers around Paramiko, a few functions that log the output as a command gets executed, reboot some server, transfer files, etc. However, I feel like I'm reinventing the wheel and this should already exist…
mkollaro
  • 11
  • 1
1
vote
1 answer

How to get the actual shell prompt string in Python?

I have a Python routine which invokes some kind of CLI (e.g telnet) and then executes commands in it. The problem is that sometimes the CLI refuses connection and commands are executed in the host shell resulting in various errors. My idea is to…
Milo
  • 655
  • 1
  • 12
  • 25
1
vote
0 answers

How to copy to specific path over ssh to a Windows server with Fabric?

How can you copy a file or folder over SSH to a specific folder (absolute path) in a remote Windows server ? Is it possible to use the remote server's environment variables to specify that path? If I use fabric's put operation: put('somedir') or…
mpaf
  • 6,597
  • 6
  • 38
  • 42
1
vote
1 answer

SSH tunnel and Python 3.3

i need to create an application (python 3.3 strictly) where users will save/load their settings online to a remote hosted database. I do not wish to change the database from listening to any other thing than localhost for security reasons, so i…
Gouz
  • 336
  • 1
  • 6
  • 19
1
vote
0 answers

Paramiko will not work when trying to connect to Digital Ocean

I use the key to SSH into Digital Ocean. Form the command line..it works ssh root@111.111.111.111 The authenticity of host 111.111.111.111 (111.111.111.111)' can't be established. ECDSA key fingerprint is…
Tampa
  • 75,446
  • 119
  • 278
  • 425
1
vote
1 answer

libcloud FileDeployment SSHClient._transport is NoneType

>>>dns_node = [i for i in conn.list_nodes() if i.uuid == 'xxxxxxxxxxxxxxxxxxxxxxx07xxxxxxxxxx'] >>>try_script = 'path/to/somefile.py' >>>dns_file = FileDeployment(try_script, target='/home/ec2-user') >>>ssh_client =…
numb3rs1x
  • 4,673
  • 5
  • 31
  • 44
1
vote
3 answers

exscript ssh on python

Im having problem with the exscript, i want to ssh to my cisco switches, but im having some trouble I wrote 2 scripts, with this one I dont have any problem, I can change the default gateway just by running the script and entering the user and…
1 2 3
99
100