Add possibility to just pass key name.
From now, it's possible to just pass the key name, not the full path to the key. By default it will be looked for in ~/.ssh directory.
This commit is contained in:
1 parent
70248bd23b
commit
38b6e1b6af
1 file changed
+3
@@ -83,6 +83,9 @@ class VMCreate:
|
||||
|
||||
if not self.ssh_key_path.endswith('.pub'):
|
||||
self.ssh_key_path += '.pub'
|
||||
if not os.path.exists(self.ssh_key_path):
|
||||
self.ssh_key_path = os.path.join(os.path.expanduser("~/.ssh"),
|
||||
self.ssh_key_path)
|
||||
if not os.path.exists(self.ssh_key_path):
|
||||
raise BoxNotFound(f'Cannot find default ssh public key: '
|
||||
f'{self.ssh_key_path}')
|
||||
|
||||
Reference in new issue
Block a user