Open muradbu opened 1 day ago
I believe the reason for this is that nixos-rebuild
uses 3 separate SSH sessions. When building on remote root with password auth, it also requires 3 password entries.
I believe the reason for this is that
nixos-rebuild
uses 3 separate SSH sessions. When building on remote root with password auth, it also requires 3 password entries.
This was also confirmed in Discourse. It seemed unlikely to me that this was intended design so I assumed it must be a bug.
Is it possible to have nixos-rebuild source the password from a secrets manager, similar to Ansible? Or is there a community project that focuses on remote deployments?
Describe the bug
While trying to build and switch a flake-based config from my Mac on a remote machine, every time I do so I get prompted for a password 3 times, with the message
Shared connection to nixos closed.
for the first 2, before it finally finalizes the rebuild.Steps To Reproduce
Steps to reproduce the behavior:
nix run nixpkgs#nixos-rebuild -- --fast --target-host murad@nixos --build-host murad@nixos --flake ./nix#nixos --use-remote-sudo switch
Expected behavior
The password should only be asked for once.
Screenshots
Additional context
Here's the relevant build output:
My sudo auth is good for 30 mins after a successful invocation:
Notify maintainers
Metadata
Remote machine:
Add a :+1: reaction to issues you find important.