diff --git a/hostnames.json b/hostnames.json new file mode 100644 index 0000000..e69de29 diff --git a/ssh-host.py b/ssh-host.py new file mode 100644 index 0000000..cefde3c --- /dev/null +++ b/ssh-host.py @@ -0,0 +1,13 @@ +#!/usr/bin/python +import subprocess +import argparse +import json +with open(‘hostnames.json’) as file: +hostnames = json.load(file) +parser = argparse.ArgumentParser() +parser.add_argument(‘-o’,’—-wan’,action = ‘store_true’) +parser.add_argument(‘name’,help=‘name of config file to use (sans .cfg)’) +parser.add_argument(‘arg’,nargs = ‘*’) +args = parser.parse_args() +cmd = [‘ssh’,’-F’,’~/.ssh/{}.cfg’.format(args.name)] +subprocess.call( \ No newline at end of file