summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--cloudinit/SshUtil.py2
2 files changed, 4 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 87592b27..0964877e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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