You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I managed to use public key authentication on windows machines with the standard config.ssh settings.
My vagrant-libvirt configuration looks like this:
I have created a vagrant user which is a member of the Administrators group in my vagrant box. According to the Windows documentation you should us C:\ProgramData\ssh\administrators_authorized_keys for admins. If I start the VM with winssh configuration available it will connect to machine and exchange the ssh keys. Unfortunately, it will place the new keys into the home directory of the vagrant user which leads to an authentication failure.
Logs:
==> windows: Waiting for domain to get an IP address...
==> windows: Waiting for machine to boot. This may take a few minutes...
windows: SSH address: 192.168.121.13:22
windows: SSH username: vagrant
windows: SSH auth method: private key
windows:
windows: Vagrant insecure key detected. Vagrant will automatically replace
windows: this with a newly generated keypair for better security.
windows:
windows: Inserting generated public key within guest...
windows: Removing insecure key from the guest if it's present...
windows: Key inserted! Disconnecting and reconnecting using new SSH key...
windows: Warning: Authentication failure. Retrying...
With standard ssh config, I am able to skip the key rotation but other things may not work properly (e.g. setup another network interface)
Describe the solution you'd like
If the vagrant user configured in the box is a member of the Administrators group, the newly created keys should be placed in C:\ProgramData\ssh\administrators_authorized_keys.
Is your feature request related to a problem? Please describe.
I managed to use public key authentication on windows machines with the standard config.ssh settings.
My vagrant-libvirt configuration looks like this:
I have created a vagrant user which is a member of the Administrators group in my vagrant box. According to the Windows documentation you should us
C:\ProgramData\ssh\administrators_authorized_keys
for admins. If I start the VM with winssh configuration available it will connect to machine and exchange the ssh keys. Unfortunately, it will place the new keys into the home directory of the vagrant user which leads to an authentication failure.Logs:
With standard ssh config, I am able to skip the key rotation but other things may not work properly (e.g. setup another network interface)
Describe the solution you'd like
If the vagrant user configured in the box is a member of the Administrators group, the newly created keys should be placed in
C:\ProgramData\ssh\administrators_authorized_keys
.Describe alternatives you've considered
A workaround would be to implement the
insert_key
setting for winssh as well.https://developer.hashicorp.com/vagrant/docs/vagrantfile/ssh_settings#config-ssh-insert_key
The text was updated successfully, but these errors were encountered: