aws-ssh-utils 0.2.1__tar.gz → 0.2.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aws-ssh-utils
3
- Version: 0.2.1
3
+ Version: 0.2.3
4
4
  Summary: Easy AWS SSHing
5
5
  Project-URL: Homepage, https://github.com/mvanderlee/aws-ssh-utils
6
6
  Author-email: Michiel Vanderlee <jmt.vanderlee@gmail.com>
@@ -0,0 +1 @@
1
+ __version__ = "0.2.3"
@@ -575,11 +575,22 @@ def get_opkssh_key_file(provider: str) -> str:
575
575
  logger.info('Found existing opkssh key')
576
576
  else:
577
577
  logger.info('Detected opkssh, logging in')
578
- cmd = f"opkssh login --provider '{provider}' -i '{opkssh_key_file}'"
579
- process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE) # noqa: S602
578
+ cmd = [
579
+ "opkssh",
580
+ "login",
581
+ "--provider",
582
+ provider,
583
+ "-i",
584
+ opkssh_key_file,
585
+ ]
586
+ process = subprocess.Popen(cmd, shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE) # noqa: S603
580
587
  process.wait()
581
588
  if process.returncode != 0:
582
589
  logger.error('Failed to authenticate using opkssh')
590
+ if process.stdout:
591
+ logger.info(process.stdout.read().decode())
592
+ if process.stderr:
593
+ logger.error(process.stderr.read().decode())
583
594
  sys.exit(process.returncode)
584
595
 
585
596
  return opkssh_key_file
@@ -1 +0,0 @@
1
- __version__ = "0.2.1"
File without changes
File without changes
File without changes