Friday, March 11, 2016

Spur SSH Client in Python

Spur is a SSH client which can be used to invoke commands on a remote machine. This is similar to Paramiko.

For spur, install the module first

pip install spur

A simple spur client looks as follows:


import sput

# Password can be provided in place of ssh key
shell=spur.SshShell(<address of remote machine,
                    <valid user in remote machine>, 
                    private_key_file=<Private SSH key file>,

# Make a dir in remote machine
with shell:["mkdir","temp"])

No comments:

Post a Comment