MCPcopy Create free account
hub / github.com/aws/aws-cli / _get_private_pem

Method _get_private_pem

awscli/customizations/ec2instanceconnect/ssh.py:458–466  ·  view source on GitHub ↗
(self, private_key)

Source from the content-addressed store, hash-verified

456 return self._get_public_key(private_key)
457
458 def _get_private_pem(self, private_key):
459 private_key_bytes = ED25519.export_private_key(
460 private_key, export_format=ED25519ExportFormat.OPENSSH_B64
461 )
462 return (
463 '-----BEGIN OPENSSH PRIVATE KEY-----\n'
464 f'{private_key_bytes.decode()}\n'
465 '-----END OPENSSH PRIVATE KEY-----\n'
466 ).encode()
467
468 def get_private_pem(self, private_key):
469 return self._get_private_pem(private_key=private_key)

Callers 1

get_private_pemMethod · 0.95

Calls 2

decodeMethod · 0.80
encodeMethod · 0.45

Tested by

no test coverage detected