diff --git a/bw_add_sshkeys.py b/bw_add_sshkeys.py index 0a8320e..f270eb7 100755 --- a/bw_add_sshkeys.py +++ b/bw_add_sshkeys.py @@ -205,10 +205,10 @@ def ssh_add(session: str, item_id: str, key_id: str, key_pw: str = "") -> None: # CAVEAT: `ssh-add` provides no useful output, even with maximum verbosity subprocess.run( ["ssh-add", "-"], - input=ssh_key, + input=ssh_key.encode("utf-8"), # Works even if ssh-askpass is not installed env=envdict, - universal_newlines=True, + universal_newlines=False, check=True, )