Open tnymlr opened 8 years ago
because docker-machine uses /dev/null file for -F parameter of ssh command.
You sure this is the exact reason? It might be failing for a different one, this just says "don't use any local SSH configuration file". Granted it could be pathing, /dev/null
is very UNIXey.
@nathanleclaire It seems that it is the reason. I tried to run it from Git bash - it works (it does some magic with /dev/null afaik). I've also tried to create file C:\dev\null and a script to empty it each time ssh runs and it started to work too. I will try to use different version of ssh though, to see if it could be ssh implementation bug.
@dikeer maybe we could write a little nullFile()
function which will return the correct thing based on OS. seems on Windows it should be NUL
, http://stackoverflow.com/questions/313111/dev-null-in-windows, hopefully that'd play OK with git bash.
The build-in ssh works. So is there need to use the external ssh.exe on Windows? I guess it strongly depends on the ssh.exe in PATH and not which shell someone runs docker-machine.exe in. Is there a way to ignore the external ssh.exe without changing PATH?
PS C:\Users\vagrant> docker-machine -D ssh default
Docker Machine Version: 0.8.2, build e18a919
Found binary path at C:\ProgramData\chocolatey\lib\docker-machine\bin\docker-machine.exe
Launching plugin server for driver hyperv
Plugin server listening at address 127.0.0.1:49927
() Calling .GetVersion
Using API Version 1
() Calling .SetConfigRaw
() Calling .GetMachineName
(default) Calling .GetState
(default) DBG | [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive ( Get-VM default ).state
(default) DBG | [stdout =====>] : Running
(default) DBG |
(default) DBG | [stderr =====>] :
(default) Calling .GetSSHHostname
(default) DBG | [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive ( Get-VM default ).state
(default) DBG | [stdout =====>] : Running
(default) DBG |
(default) DBG | [stderr =====>] :
(default) DBG | [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive (( Get-VM default ).networkadapters[0]).ipaddresses[0]
(default) DBG | [stdout =====>] : 192.168.254.134
(default) DBG |
(default) DBG | [stderr =====>] :
(default) Calling .GetSSHPort
(default) Calling .GetSSHKeyPath
(default) Calling .GetSSHKeyPath
(default) Calling .GetSSHUsername
SSH binary not found, using native Go implementation
&{{{<nil> 0 [] [] []} docker [0xc2bd70] <nil> []} 192.168.254.134 22 <nil>}
## .
## ## ## ==
## ## ## ## ## ===
/"""""""""""""""""\___/ ===
~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~
\______ o __/
\ \ __/
\____\_______/
_ _ ____ _ _
| |__ ___ ___ | |_|___ \ __| | ___ ___| | _____ _ __
| '_ \ / _ \ / _ \| __| __) / _` |/ _ \ / __| |/ / _ \ '__|
| |_) | (_) | (_) | |_ / __/ (_| | (_) | (__| < __/ |
|_.__/ \___/ \___/ \__|_____\__,_|\___/ \___|_|\_\___|_|
Boot2Docker version 1.12.3, build HEAD : 7fc7575 - Thu Oct 27 17:23:17 UTC 2016
Docker version 1.12.3, build 6b644ec
docker@default:~$ ls
log.log
docker@default:~$ exit
Making call to close driver server
(default) Calling .Close
Successfully made call to close driver server
Making call to close connection to plugin binary
(default) DBG | Closing plugin on server side
@StefanScherer "--native-ssh" option will solve it. https://docs.docker.com/machine/reference/ssh/#/different-types-of-ssh
Unable to create new machine. Actually unable to do anything involving ssh with machine, because docker-machine uses /dev/null file for -F parameter of ssh command.