SSH Agent

SSH agent module of ParallelSSH

class pssh.agent.SSHAgent

paramiko.agent.Agent compatible class for programmatically supplying an SSH agent

Example Usage

from pssh.agent import SSHAgent
from pssh.utils import load_private_key
from pssh import ParallelSSHClient

agent = SSHAgent()
agent.add_key(load_private_key('my_private_key_filename'))
agent.add_key(load_private_key('my_other_private_key_filename'))
hosts = ['my_host', 'my_other_host']

client = ParallelSSHClient(hosts, agent=agent)
client.run_command('uname')
add_key(key)

Add key to agent.

Parameters:key (paramiko.pkey.PKey) – Key to add