GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Python/get_info_remoute_srv.py at master · Sophie-Williams/Python Expand file tree/ Copy pathget_info_remoute_srv.pyMore file actions 31 lines (25 loc) · 915 Bytes / Copy pathget_info_remoute_srv.pyFile metadata and controls31 lines (25 loc) · 915 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 # Script Name : get_info_remoute_srv.py # Author : Pavel Sirotkin # Created : 3th April 2016 # Last Modified : - # Version : 1.0.0 # Modifications : # Description : this will get info about remoute server on linux through ssh connection. Connect these servers must be through keys import subprocess HOSTS = ('proxy1', 'proxy') COMMANDS = ('uname -a', 'uptime') for host in HOSTS: result = [] for command in COMMANDS: ssh = subprocess.Popen(["ssh", "%s" % host, command], shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE) result.append(ssh.stdout.readlines()) print('--------------- ' + host + ' --------------- ') for res in result: if not res: print(ssh.stderr.readlines()) break else: print(res) |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |