GetUserFiles(user,
mkdir=False,
dircheck=True,
kind=constants.SSHK_DSA,
_homedir_fn=None)
| source code
|
Return the paths of a user's SSH files.
- Parameters:
user (string) - Username
mkdir (bool) - Whether to create ".ssh" directory if it doesn't exist
dircheck (bool) - Whether to check if ".ssh" directory exists
kind (string) - One of constants.SSHK_ALL
- Returns: tuple; (string, string, string)
- Tuple containing three file system paths; the private SSH key
file, the public SSH key file and the user's
authorized_keys file
- Raises:
errors.OpExecError - When home directory of the user can not be determined
errors.OpExecError - Regardless of the mkdir parameters, this exception is
raised if ~$user/.ssh is not a directory and
dircheck is set to True
|