diff --git a/rhodecode/apps/ssh_support/utils.py b/rhodecode/apps/ssh_support/utils.py --- a/rhodecode/apps/ssh_support/utils.py +++ b/rhodecode/apps/ssh_support/utils.py @@ -53,7 +53,7 @@ def _generate_ssh_authorized_keys_file( authorized_keys_file_path = os.path.abspath( os.path.expanduser(authorized_keys_file_path)) - tmp_file_dir = tempfile.gettempdir() + tmp_file_dir = os.path.dirname(authorized_keys_file_path) all_active_keys = get_all_active_keys()