Skip to content

Instantly share code, notes, and snippets.

View Arun-Baskaran's full-sized avatar

Arun-Baskaran

View GitHub Profile
#!/usr/bin/python
# Program to check whether ClamAV is installed
import paramiko
import os
file1 = "~/ClamAv-Status"
Server_List = "~/server.list"
def ssh_connection(source_server , source_os_password):
Client = paramiko.SSHClient()
Client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
Client.connect(hostname=source_server, password=source_os_password)
@Arun-Baskaran
Arun-Baskaran / python_over_ssh
Created April 26, 2017 10:37 — forked from mattyjones/python_over_ssh
Execute a script located on a remote server over ssh using python
#! /usr/bin/env python
import secure
import pexpect
# the file containing the list of servers to log into
input_file = "script_list"
# The login creds
user = secure.USER