From: Alyssa Rosenzweig Date: Mon, 25 Jun 2018 18:22:03 +0000 (-0400) Subject: Open SSH example X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b2b1b982f15fe353217323abc77b970bbca7d7bc;p=libremanage.git Open SSH example --- diff --git a/libremanage.py b/libremanage.py index dc51722..b089ca9 100644 --- a/libremanage.py +++ b/libremanage.py @@ -20,6 +20,7 @@ along with this program. If not, see . import sys import json import functools +import subprocess USAGE = """ Usage: @@ -42,7 +43,7 @@ with open("config.json") as f: CONFIG = json.load(f) def open_ssh(config): - print(config) + subprocess.run(["ssh", config["username"] + "@" + config["host"], "-p", str(config["port"])]) open_ssh(CONFIG["managers"]["myboard"]) print(CONFIG)