-
Notifications
You must be signed in to change notification settings - Fork 33
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
SSHFS mount fails, too many keys in agent #88
Comments
I saw issue #26 and I appear to be getting similar results. Further to this, I also get the same error and outcome using fedora/27-cloud-base as well. |
OK, this may not really be an issue. So, as it turns out you shouldn't attempt to setup a synced folder over the top of the vagrant user's home directory. (facepalm). One guess what's no longer available..... If you said the .ssh folder containing the authorized_keys file, you get to Advance to Go (collect $200). :) To help those out on how to debug something like this. You can do this:
I noticed that ls -la in the home directory itself (which showed a .ssh folder) gave different results to ls -la /home/vagrant (this did not have a .ssh folder). I was confused for a while, and it had me stumped how they were different. It then clicked that I was seeing the synced folder when specifying the full path. So, now, let me retest, if after resolving that part of, well, let's call it my issue for now (hahah), to see if there's anything remaining here. |
Alright, I've confirmed that I'm only getting this problem on the Mac running virtualbox. I copied the exact Vagrantfile between the two and the CentOS mounts the sshfs no problem. In both cases I removed all boxes and destroyed all existing vagrant machines. It appears to be specific to vagrant-sshfs on Mac as I can vagrant ssh immediately without a problem.
It doesn't appear to be box related either, as the same SSHFS mount fails in fedora/27-cloud-base for me as well. I'm relatively new to Vagrant, anything else that'd be useful to further fault find? |
do you use an ssh-agent and do you have a lot of keys currently in the agent? |
Yes, and I have a few keys in my agent, and more than I first thought actually. I need to clean some of them up, but I'll still have about 4 or 5 left after I finish. |
If you remove some keys from the agent does it work? |
I removed all my keys and it works. Due to my config, it didn't click with me that I was adding a new key to the agent everytime I created a new vagrant machine. Added the following to my ssh client config to stop that behaviour for using Vagrant
I can submit a pull request to update the README FAQ with some information in the next day or two if you'd like. |
If a user has set AddKeysToAgent=yes in their ssh config then the temporary SSH key that vagrant creates could get added to their agent each time an SSHFS mount is performed for a different machine. Let's disable that. Fixes #88
I think I'm running into the same or a similar problem (on current git master of both vagrant & -sshfs). With this
...I have to run it like |
yeah it just means that you have too many keys in your agent most likely added by you) and the remote SSH daemon kicks you out early. You can try adding Let me know if it works! |
I just hit this. I also have a lot of SSH keys and they are actually served by GPG. the sshfs_opts_append didn't work, but SSH_AUTH_SOCK= did ... F30 host, 20190604 F31/rawhide-cloud-base guest |
ditto AUTH work while the option doesn't. |
Got same problem with bunch of keys in agent. Given workaround with SSH_AUTH_SOCK= does work.
This works but you need to give this option to other ssh |
I have a Yubikey and found out that it did not work with the Yubikey plugged in. Using I was a bit confused at first because I thought agent keys were not being used by Vagrant by default, with the config-ssh-keys_only option. Then I realised that sshfs is a separate plugin. Does it not respect Also, did it not work because in my |
Steps to reproduce:
Edit the Vagrantfile to add
config.vm.synced_folder "./", "/home/vagrant", type: "sshfs"
Various package details from my macOS High Sierra (10.13.2).
I was able to reproduce on CentOS 6.9 with the same procedure, where'd I'd never used vagrant or VirtualBox in the past.
The text was updated successfully, but these errors were encountered: