Skip to content

Commit

Permalink
nixos-rebuild: fix entering sudo password over SSH
Browse files Browse the repository at this point in the history
We always want to use `ssh -t` to force PTY allocation as there may be
interactive SSH prompts like trusting unknown hosts.
  • Loading branch information
Enzime committed Jan 6, 2024
1 parent 5aad97f commit 09fd207
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ if [ "$action" = edit ]; then
exit 1
fi

SSHOPTS="$NIX_SSHOPTS -o ControlMaster=auto -o ControlPath=$tmpDir/ssh-%n -o ControlPersist=60"
SSHOPTS="$NIX_SSHOPTS -o ControlMaster=auto -o ControlPath=$tmpDir/ssh-%n -o ControlPersist=60 -t"

# First build Nix, since NixOS may require a newer version than the
# current one.
Expand Down

0 comments on commit 09fd207

Please sign in to comment.