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

Cannot ignore new Windows 10 built-in SSH client in Vagrant 2.0.2 #9433

Closed
jstangroome opened this issue Feb 2, 2018 · 6 comments
Closed

Cannot ignore new Windows 10 built-in SSH client in Vagrant 2.0.2 #9433

jstangroome opened this issue Feb 2, 2018 · 6 comments
Assignees
Milestone

Comments

@jstangroome
Copy link

@jstangroome jstangroome commented Feb 2, 2018

Vagrant version

Vagrant 2.0.2

Host operating system

Windows 10 x64 version 1709 (OS Build 16299.214)
also: VirtualBox 5.2.6 r120293

C:\Windows\System32\OpenSSH\ssh.exe -V
OpenSSH_7.5p1, without OpenSSL

Guest operating system

Ubuntu 14.04

Vagrantfile

The result of vagrant init ubuntu/trusty is sufficient.

Expected behavior

vagrant ssh should succeed.

Actual behavior

vagrant ssh returned error:

vagrant@127.0.0.1: Permission denied (publickey).

Steps to reproduce

  1. Install Windows 10 OpenSSH beta
  2. Open default shell (PowerShell) via Win+X, i. Also reproducible with cmd.exe shell.
  3. vagrant init ubuntu/trusty
  4. vagrant up
  5. vagrant ssh

References

With increased verbosity (eg vagrant ssh -- -vvv) the output shows:

Load key "./.vagrant/machines/section/virtualbox/private_key": invalid format.

This Load key ... invalid format error is most likely a bug with Windows 10's OpenSSH Beta, possibly related to only ed25519 keys currently being supported: PowerShell/Win32-OpenSSH#973 (comment)

However, I cannot easily coerce Vagrant to use its embedded SSH client instead since this change:
#9143 (comment)

I'd hoped VAGRANT_PREFER_SYSTEM_BIN=0 vagrant ssh or VAGRANT_PREFER_SYSTEM_BIN=false vagrant ssh would work but it didn't.

Modifying the PATH to exclude C:\Windows\System32\OpenSSH resolves the issue. Using a Cygwin shell with its own SSH client also resolves the issue.

Uninstalling the Windows 10 SSH beta also resolves the issue.

Would be great if Vagrant 2.0.2 can be forced to use embedded SSH via vargant-specific environment variable command line parameter or even if Vagrant could generate ed25519 SSH keys.

@besmirzanaj

This comment has been minimized.

Copy link

@besmirzanaj besmirzanaj commented Feb 28, 2018

on a bare new W10 system I got this:

Permissions for 'D:/Repo/vagrant/.vagrant/machines/default/virtualbox/private_key' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "D:/Repo/vagrant/.vagrant/machines/default/virtualbox/private_key": bad permissions
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
vagrant@127.0.0.1: Permission denied (publickey).

had to explicitly give permissions to the private key removing 'Authenticated users' and 'users' from acl.

@sibinx7

This comment has been minimized.

Copy link

@sibinx7 sibinx7 commented Mar 7, 2018

I uninstall Powershell SSH ( System32/openSSH), then restarted the system. Now I can access vagrant via ssh. Run vagrant ssh --debug, then you can find the real issue.

Goto App-> Manage Optional features -> Uninstall OpenSSH components ( Windows 10 settings)

@besmirzanaj

This comment has been minimized.

Copy link

@besmirzanaj besmirzanaj commented Mar 7, 2018

Have to try that, thank you.

@Raffaello

This comment has been minimized.

Copy link

@Raffaello Raffaello commented Mar 15, 2018

@sibinx7 that is not a real solution. there should no be conflict with powershell

@Raffaello

This comment has been minimized.

Copy link

@Raffaello Raffaello commented Mar 15, 2018

I have a similar issues and it seems related to private_key file permission:
OS: Win10, vagrant 2.0.2

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions for '[..]\default\\virtualbox\\private_key' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "[..]\\default\\virtualbox\\private_key": bad permissions
vagrant@127.0.0.1: Permission denied (publickey).
@sibinx7

This comment has been minimized.

Copy link

@sibinx7 sibinx7 commented Mar 15, 2018

@Raffaello Yes, It just a workaround. I had this issue after I install Heroku command line tool and PowerShell openssh. Anyway vagrant is working fine with Cmder.

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

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.