diff --git a/tsshbatch.py b/tsshbatch.py new file mode 100755 index 0000000..f21176d --- /dev/null +++ b/tsshbatch.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python +# Non-Interactive ssh Connection +# usage: sshservers.py host username password command +# $Id: tsshbatch.py,v 1.101 2010/09/27 20:35:36 tundra Exp $ + +import paramiko +import sys + +ssh = paramiko.SSHClient() + +ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) +ssh.connect(host, username=user, password=pw) +stdin, stdout, stderr = ssh.exec_command(command) +print stdout.readlines()