module documentation
Implementation module for the `ckeygen` command.
Class |
|
Undocumented |
Function | change |
Undocumented |
Function | display |
Undocumented |
Function | enumrepresentation |
Undocumented |
Function | generate |
Undocumented |
Function | generate |
Undocumented |
Function | generate |
Undocumented |
Function | generate |
Undocumented |
Function | handle |
Undocumented |
Function | print |
Undocumented |
Function | run |
Undocumented |
Variable | supported |
Undocumented |
Function | _default |
Return a reasonable default private key subtype for a given key type. |
Function | _get |
If options["filename"] is None, prompt the user to enter a path or attempt to set it to .ssh/id_rsa |
Function | _input |
Ask the user where to save the key. |
Function | _key |
Undocumented |
Function | _save |
Persist a SSH key on local filesystem. |
Return a reasonable default private key subtype for a given key type.
Parameters | |
keystr | A key type, as returned by twisted.conch.ssh.keys.Key.type . |
Returns | |
str | A private OpenSSH key subtype ('PEM' or 'v1'). |
def _getKeyOrDefault(options:
dict[ Any, Any]
, inputCollector: Callable[ [ str], str] | None
= None, keyTypeName: str
= 'rsa') -> str
:
¶
If options["filename"] is None, prompt the user to enter a path or attempt to set it to .ssh/id_rsa
Parameters | |
options:dict[ | command line options |
inputCallable[ | dependency injection for testing |
keystr | key type or "rsa" |
Returns | |
str | Undocumented |
Ask the user where to save the key.
This needs to be a separate function so the unit test can patch it.
def _saveKey(key:
keys.Key
, options: dict[ Any, Any]
, inputCollector: Callable[ [ str], str] | None
= None):
¶
Persist a SSH key on local filesystem.
Parameters | |
key:keys.Key | Key which is persisted on local filesystem. |
options:dict[ | |
inputCallable[ | Dependency injection for testing. |