@@ -54,24 +54,23 @@ def get_ip():
54
54
55
55
# SSH to self, must have and localhost entry in config file and
56
56
# correcponding keys present, also sshd must be installed and running
57
- # if self.user == "rynik":
58
- # c = Connection.get("kohn", local=False)
59
- # travis config file must change user password to desired
60
- # else:
61
- # c = Connection.open(self.user, "127.0.0.1", ssh_key_file=None,
62
- # ssh_password="12345678", server_name="test")
57
+ if self .user == "rynik" :
58
+ c = Connection .get ("kohn" , local = False )
59
+ # travis/git config file must change user password to desired
60
+ else :
61
+ c = Connection .open (self .user , "127.0.0.1" , ssh_key_file = None ,
62
+ ssh_password = "12345678" , server_name = "test" )
63
63
# localhost = get_ip()
64
- localhost = subprocess .run (["curl" , "ifconfig.me" ],
65
- stdout = subprocess .PIPE , # python 3.6
66
- encoding = "utf-8" ).stdout .strip ()
67
- user = getpass .getuser ()
68
- Connection .add_hosts ({
69
- "user" : self .user ,
70
- "hostname" : localhost ,
71
- "identityfile" : "~/.ssh/id_rsa"
72
- })
73
- print (Connection .available_hosts )
74
- c = Connection .get (localhost , local = False )
64
+ # localhost = subprocess.run(["curl", "ifconfig.me"],
65
+ # stdout=subprocess.PIPE, # python 3.6
66
+ # encoding="utf-8").stdout.strip()
67
+ # Connection.add_hosts({
68
+ # "user": self.user,
69
+ # "hostname": localhost,
70
+ # "identityfile": "~/.ssh/id_rsa"
71
+ # })
72
+ # print(Connection.available_hosts)
73
+ # c = Connection.get(localhost, local=False)
75
74
76
75
self .p = c .pathlib .Path ("/tmp" )
77
76
0 commit comments