diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | cloudinit/SshUtil.py | 2 |
2 files changed, 4 insertions, 0 deletions
@@ -1,3 +1,5 @@ +0.6.4: + - support relative path in AuthorizedKeysFile (LP: #970071). 0.6.3: - add sample systemd config files [Garrett Holmstrom] - add Fedora support [Garrent Holstrom] (LP: #883286) diff --git a/cloudinit/SshUtil.py b/cloudinit/SshUtil.py index 22f4f2fc..a081fbe8 100644 --- a/cloudinit/SshUtil.py +++ b/cloudinit/SshUtil.py @@ -155,6 +155,8 @@ def setup_user_keys(keys, user, key_prefix, log=None): akeys = ssh_cfg.get("AuthorizedKeysFile", "%h/.ssh/authorized_keys") akeys = akeys.replace("%h", pwent.pw_dir) akeys = akeys.replace("%u", user) + if not akeys.startswith('/'): + akeys = os.path.join(pwent.pw_dir, akeys) authorized_keys = akeys except Exception: authorized_keys = '%s/.ssh/authorized_keys' % pwent.pw_dir |