Closed PierreR closed 4 years ago
If I change systemctl start sshd<enter>
into "sudo systemctl start sshd<enter>"
, here is the output of the sshd service status:
On the host:
g:false, HandshakeTimeout:0, UseSftp:false, KeepAliveInterval:5000000000, Timeout:0}...
2019/09/06 13:41:15 packer.exe: 2019/09/06 13:41:15 [DEBUG] reconnecting to TCP connection for SSH
2019/09/06 13:41:15 packer.exe: 2019/09/06 13:41:15 [DEBUG] handshaking with SSH
2019/09/06 13:41:15 packer.exe: 2019/09/06 13:41:15 [DEBUG] SSH handshake err: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2019/09/06 13:41:15 packer.exe: 2019/09/06 13:41:15 [DEBUG] Detected authentication error. Increasing handshake attempts.
2019/09/06 13:41:22 packer.exe: 2019/09/06 13:41:22 [INFO] Attempting SSH connection to 127.0.0.1:2422...
2019/09/06 13:41:22 packer.exe: 2019/09/06 13:41:22 [DEBUG] Config to &ssh.Config{SSHConfig:(*ssh.ClientConfig)(0xc0000168f0), Connection:(func() (net.Conn, error))(0x11a65f0), Pty:false, DisableAgentForwarding:false, HandshakeTimeout:0, UseSftp:false, KeepAliveInterval:5000000000, Timeout:0}...
In 19.03
the console user is root
, now it is nixos
.
I have tried to add a "sudo -s<enter>"
as the first boot command but no luck.
Ok I know how to fix this. Will send a PR when 19.09 is out.
sshd won't start up with nixos-19.09 because of an extra security. A new security setting might break the current nixbox setting. Is there an easy trick to make it work again (using packer to build a box) ? Any idea ?![2019-09-05_22-34-26](https://user-images.githubusercontent.com/93115/64378906-086dd700-d02e-11e9-8e4f-1b422dd0fb32.png)
Tried with: "iso_url": "https://releases.nixos.org/nixos/unstable/nixos-19.09pre191505.7d5375ebf4c/nixos-minimal-19.09pre191505.7d5375ebf4c-x86_64-linux.iso"