Using nixos-anywhere, i deployed Nixos to Ubuntu and Debian VPS’ hosted by contabo, seemingly successful. But after the server reboot, the system is completely unreachable (ssh times out, ping gets lost).
I followed nixos-anywhere’s quick-start guide without any major modifications. The setup runs without any errors and finally echoes “### Done! ###”
Maybe related: i can access the vm’s terminal via vnc and it shows the login shell, but it won’t accept the root password (i temporarily tried very simple ones to rule out misstypes)
If i set a password with users.users.root.hashedPassword i can at least login via a VNC-viewer. ip addr then shows, that the ip has changed, which would explain why icmp and ssh goes nowhere.
yes.
Contabo also uses netplan to configure the interfaces, which means i have a handy .yaml file as a template to define interface addr. and routes in my nix config.
I think I forgot to read the log you posted, so you have your public ssh key set up.
I can only say that I use a vaguely similar deployment on hetzner and for logging on to the deployed vm I use a match block (HostName is the ip of the vm obviously) in my ssh_config whatsoever and ssh thefinevm to log onto it:
Host thefinevm
User root
HostName ip.ip.ip.ip
IdentityFile ~/.ssh/id_ed25519
IdentitiesOnly yes
PubKeyAuthentication yes
PasswordAuthentication no
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
LogLevel FATAL
It’s a fairly fresh vm and certainly has room for improvements but as a template it should do, other means of logging in can be explored when that is working.
ssh isn’t the problem here, when i can’t even ping the server!
As i mentioned in my second post, the servers ip has changed after nixos was installed. As a result the server isn’t reachable under it’s assigned (static) IP.
DHCP respects staticly set network configurations, Disabling it would mean i wouldn’t even get assigned a dynamic IP.
I’ve tested it and as expected the ethernet interface is down as a result.
as i’ve said, i have to carry over the static network configuration (originally handled by netplan on debian) and leave dhcp enabled, because dhcpd was also running on the host-provided images.