cloudmesh.management.configuration.SSHkey

Module Contents

Classes

SSHkey

dict() -> new empty dictionary

class cloudmesh.management.configuration.SSHkey.SSHkey(name=None, path=None)

Bases: dict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

static _update_dict(name, d)
load(self, path=None, group=['local'])
add(self, key=None, group=['local'], filename=None)
set_permissions(self, path)

Sets the permissions of the path assuming the path is a public or private key :param path: :return:

get_from_git(self, user, keyname=None)

gets the key from github

Parameters
  • keyname – the keyname

  • user – the github username

Returns

an array of public keys

Return type

list

__str__(self)

Return str(self).

property fingerprint(self)
property type(self)
property comment(self)
classmethod _fingerprint(cls, entirekey)

returns the fingerprint of a key. :param entirekey: the key :type entirekey: string

classmethod _key_fingerprint(cls, key_string)

create the fingerprint form just the key.

Parameters

key_string (string) – the key

classmethod _parse(cls, keystring)

parse the keystring/keycontent into type,key,comment :param keystring: the content of a key in string format

_validate(self, keytype, key)

reads the key string from a file. THIS FUNCTION HAS A BUG.

Parameters
  • key – either the name of a file that contains the key, or the entire contents of such a file

  • keytype – if ‘file’ the key is read form the file specified in key. if ‘string’ the key is passed as a string in key

_keyname_sanitation(self, username, keyname)