#!/usr/bin/env python3
import os
import sys
import re
try:
number = [arg for arg in sys.argv if re.search(r'^\d{1,}$', arg)][0]
SSHKEY=os.environ['SSHKEY']
os.system(f'sshpass -p "{SSHKEY}" ssh gimpei@192.168.14.{number}')
except Exception as ex:
print('something wrong', ex)
Created
July 22, 2018 19:39
-
-
Save GINK03/8547c388639c310bb33c07a4f30ccc87 to your computer and use it in GitHub Desktop.
ssh short cut
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment