Skip to content

Commit

Permalink
fix(otupdate): use expanduser to get a relative path for authorized_k…
Browse files Browse the repository at this point in the history
…eys. (#13457)
  • Loading branch information
vegano1 authored and TamarZanzouri committed Sep 13, 2023
1 parent 0f4eb0f commit 3ddcb13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion update-server/otupdate/common/ssh_key_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def authorized_keys(mode: str = "r") -> Generator[IO[Any], None, None]:
:param mode: As :py:meth:`open`
"""
path = "/var/home/.ssh/authorized_keys"
path = os.path.expanduser("~/.ssh/authorized_keys")
if not os.path.exists(path):
os.makedirs(os.path.dirname(path))
open(path, "w").close()
Expand Down

0 comments on commit 3ddcb13

Please sign in to comment.