-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NIX_SSHOPTS not passed properly to nix-build in nixos-rebuild.sh #80142
Comments
reading through NixOS/nix#1994 it seems NIX_SSHOPTS isn't supported for |
No, |
ok. I've debugged the issue and figure out that NIX_SSHOPTS passes fine up to inner Can you try
with your NIX_SSHOPTS hook? For me, NIX_SSHOPTS doesn't work at all. What works, is setting ssh host in
|
This works fine, just as expected. In fact my current workaround is a snippet of bash doing export NIX_SSHOPTS="-i /root/.ssh/id_nix_store -o ServerAliveInterval=15 -o ServerAliveCountMax=3000 -o IPQoS=throughput"
nix-channel --update
nix build --no-link '(with import <nixpkgs/nixos> { }; system)' --option extra-binary-caches ssh://nix-ssh@server
nixos-rebuild switch
did you mean
Well that didn't make a difference. On the server I still see:
but when calling
Both machines on 19.09-stable and up-to-date (well, for testing this is let the client fall behind a few days). |
okay, I give up. |
That, in turn, seems strange to me as I have a pretty standard out-of-the box setup. |
Hello, I'm a bot and I thank you in the name of the community for opening this issue. To help our human contributors focus on the most-relevant reports, I check up on old issues to see if they're still relevant. This issue has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human. The community would appreciate your effort in checking if the issue is still valid. If it isn't, please close it. If the issue persists, and you'd like to remove the stale label, you simply need to leave a comment. Your comment can be as simple as "still important to me". If you'd like it to get more attention, you can ask for help by searching for maintainers and people that previously touched related code and @ mention them in a comment. You can use Git blame or GitHub's web interface on the relevant files to find them. Lastly, you can always ask for help at our Discourse Forum or at #nixos' IRC channel. |
so no way to use non default ssh key with |
I tested. NIX_SSHOPTS="-i ./terraform/testnet/id_rsa.pem"
export NIX_SSHOPTS
nixos-rebuild switch --fast --flake .#node-test-a --target-host root@ec2-3-250-164-158.eu-west-1.compute.amazonaws.com It worked for me. Nix 22.11. Issue in theory may be closed, so may be where one could add docs about it? |
In case it helps to others, I use following command for deployment using no-standard SSH port:
Using NixOS 22.11 |
Describe the bug
When running
no public key authentication happens (as shown in log of sshd on server)
stracing showed me that this seems to be the failing call
I first suspected this to be a
nix
issue, hence my report at NixOS/nix#3314To Reproduce
Steps to reproduce the behavior:
please see NixOS/nix#3314
Expected behavior
nixos-rebuiöd should fetch all missing binaries from the ssh-served store, then rebuild the system.
Additional context
Add any other context about the problem here.
Metadata
Client
Server
Maintainer information:
The text was updated successfully, but these errors were encountered: