Skip to content

Commit

Permalink
Applying patch to prevent ssh public key override (#3309)
Browse files Browse the repository at this point in the history
  • Loading branch information
peytonr18 authored Jan 28, 2025
1 parent bbe5b0a commit 0c8db73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion azurelinuxagent/common/osutil/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ def deploy_ssh_pubkey(self, username, pubkey):
raise OSUtilError("Bad public key: {0}".format(value))
if not value.endswith("\n"):
value += "\n"
fileutil.write_file(path, value)
fileutil.write_file(path, value, append=True)
elif thumbprint is not None:
lib_dir = conf.get_lib_dir()
crt_path = os.path.join(lib_dir, thumbprint + '.crt')
Expand Down

0 comments on commit 0c8db73

Please sign in to comment.