-
-
Notifications
You must be signed in to change notification settings - Fork 126
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
feat: How to connect with different user after reboot? #409
Comments
Or even maybe Host 11.11.11.11
IdentityFile ~/.ssh/vm
IdentitiesOnly yes
User ubuntu
Host afterinstall
IdentityFile ~/.ssh/vm
IdentitiesOnly yes
User root Would a PR be welcome on this? What would you reckon is a good solution? |
It should kexec onto the new kernel (this is not a reboot) and nixos-anywhere will reconnect to the machine using generated ssh keys from prior to kexec and install nixos. is this not happening? your nixosConfiguration flake should have configured the user and ssh key (if that is your method to connect) to use after reboot. by after reboot am I correct to think that NixOS is installed at this point? If that is the case nixos-anywheres job is complete. |
First I do |
please provide the full logs with it should be trying to reconnect with the user provided to install as and using the generated key that it installed. you can try to debug why ssh is not allowing login by logging in yourself after kexec and looking at the ssh logs. the nixos-anywhere key will be inserted into |
you should not be having this
EDIT strike that. it should be ok. |
@sedlund : Ah thanks a lot! |
See #411. Thanks. |
I have VM that has a user
ubuntu
.I can run
nixos-anywhere --flake ... 11.11.11.11
(which actually works on engine.switch.ch which is really great). The~/.ssh/config
is:However once it reboots -> I can no longer connect because the user changed to
root
=). It works if I in the meantime change theUser ubuntu
toUser root
.Is there a way to somehow trick
nixos-anywhere
to useroot
after install or some other ssh options?The text was updated successfully, but these errors were encountered: