Skip to content
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

Nanobox-machine fails on win redstone or win10 with native SSH #652

Open
baybal opened this issue Mar 5, 2018 · 4 comments
Open

Nanobox-machine fails on win redstone or win10 with native SSH #652

baybal opened this issue Mar 5, 2018 · 4 comments

Comments

@baybal
Copy link

baybal commented Mar 5, 2018

(nanobox) DBG | Checking vm logs: C:\Users\ASUS.docker\machine\machines\nanobox\nanobox\Logs\VBox.log
(nanobox) DBG | Getting to WaitForSSH function...
(nanobox) DBG | Using SSH client type: external
(nanobox) DBG | &{[-F /dev/null -o PasswordAuthentication=no -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -o ControlMaster=no -o ControlPath=none [email protected] -o IdentitiesOnly=yes -i C:\Users\ASUS.docker\machine\machines\nanobox\id_rsa -p 50748] C:\WINDOWS\System32\OpenSSH\ssh.exe }
(nanobox) DBG | About to run SSH command:
(nanobox) DBG | exit 0
(nanobox) DBG | SSH cmd err, output: exit status 255:
(nanobox) DBG | Error getting ssh command 'exit 0' : Something went wrong running an SSH command!
(nanobox) DBG | command : exit 0
(nanobox) DBG | err : exit status 255
(nanobox) DBG | output :
(nanobox) DBG |
(nanobox) DBG | Getting to WaitForSSH function...

Recent Windows versions come with native OpenSSH builds. There is no /dev/null on Windows obviously.

@baybal
Copy link
Author

baybal commented Mar 5, 2018

An easy solution seemed to be to use --native-ssh option for docker machine (so it uses go stdlib internal ssh), but it seem to be defunct on the build being shipped with nanobox (it still tries to use external SSH even with that parameter passed to it)

@baybal
Copy link
Author

baybal commented Mar 5, 2018

System: Windows redstone internal preview December build.
VM: virtualbox 5.2.8

@baybal
Copy link
Author

baybal commented Mar 5, 2018

C:\WINDOWS\System32\OpenSSH\ssh.exe: Could not resolve hostname /dev/null: No such host is known.
PS C:\Users\ASUS\alpha-draft-communication-service> ssh -F /dev/null -o PasswordAuthentication=no -o StrictHostKeyChecki
ng=no -o UserKnownHostsFile=/dev/null -o LogLevel=verbose -vvv -o ConnectionAttempts=3 -o ConnectTimeout=10 -o ControlMa
ster=no -o ControlPath=none [email protected] -o IdentitiesOnly=yes -i C:\Users\ASUS.docker\machine\machines\nanobox\id_
rsa -p 50957
OpenSSH_7.5p1, without OpenSSL
debug1: Reading configuration data /dev/null
debug2: resolving "127.0.0.1" port 50957
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 127.0.0.1 [127.0.0.1] port 50957.
debug3: socket:488, socktype:1, io:0000023462C54BE0, fd:3
debug2: fd 3 setting O_NONBLOCK
debug1: fd 3 clearing O_NONBLOCK
debug1: Connection established.
debug3: timeout: 10000 ms remain after connect
key_load_public: invalid format
debug1: identity file C:\Users\ASUS\.docker\machine\machines\nanobox\id_rsa type -1
debug3: Failed to open file:C:\Users\ASUS\.docker\machine\machines\nanobox\id_rsa-cert error:2
debug3: Failed to open file:C:\Users\ASUS\.docker\machine\machines\nanobox\id_rsa-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\Users\ASUS\.docker\machine\machines\nanobox\id_rsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.5
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.2
debug1: match: OpenSSH_7.2 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to 127.0.0.1:50957 as 'docker'
debug3: put_host_port: [127.0.0.1]:50957
debug3: hostkeys_foreach: reading file "/dev/null"
debug3: Failed to open file:./ssh_known_hosts error:2
debug3: Failed to open file:./ssh_known_hosts2 error:2
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
debug3: receive packet: type 20
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,[email protected],ext-info-c
debug2: host key algorithms: [email protected],ssh-ed25519
debug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr
debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr
debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none
debug2: compression stoc: none
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: [email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1
debug2: host key algorithms: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256
debug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,[email protected]
debug2: compression stoc: none,[email protected]
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug1: kex: algorithm: [email protected]
debug1: kex: host key algorithm: (no match)
Unable to negotiate with 127.0.0.1 port 50957: no matching host key type found. Their offer: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256
PS C:\Users\ASUS\alpha-draft-communication-service>

The issue is with nanobox image not providing ec25519 host key

@baybal
Copy link
Author

baybal commented Mar 5, 2018

For now , there is a workaround: you need to compile openssh for windows by hand with RSA keys enabled at configure time, then replace the one that came from windows update with what you compiled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant