help with unable to ssh after Sierra upgrade

377 views
Skip to first unread message

Kirstin Veltman

unread,
Oct 7, 2016, 1:53:26 AM10/7/16
to Vagrant
Hi everyone,

I've been having some trouble ssh-ing to VMs once I upgraded my Mac OS to Sierra. I'm using CentOS 7.1 (bento/centos-7.1 and centos/7) as my main VM, but I'm also having the same issue with Ubuntu (ubuntu/trusty64) and precise64 (hashicorp/precise64). When I do "vagrant up" or "vagrant up --provision" then try to "vagrant ssh", I get the following error:

/Users/Raven/.ssh/config: terminating, 1 bad configuration options

I did have a previous version of Vagrant installed when I upgraded to Sierra (I don't remember which one, though). I've tried:
- upgrading to Vagrant 1.8.6
- uninstalling Vagrant & removing files per https://www.vagrantup.com/docs/installation/uninstallation.html and then re-installing
- upgrading VirtualBox to the latest version
- ensuring that "UseRoaming no" is set in my User's /.ssh/config
- vagrant destroy/vagrant up multiple times on all boxes
- vagrant destroy on all VMs then trying to bring up a single VM
- disabled anti-virus
- tried adding "config.ssh.insert_key = false" to the Vagrantfile to no effect

When the VMs are booted with "vagrant up", I'm able to access them via VirtualBox's UI; I just keep getting that error if I try to ssh to the VMs.

I ran a debug on the ssh command and the following was at the end:

DEBUG virtualbox_5_0:   - [1, "ssh", 2222, 22]
DEBUG ssh: Checking key permissions: /Users/Raven/Vagrant/CentOS7/.vagrant/machines/default/virtualbox/private_key
 INFO ssh: Invoking SSH: ssh ["vag...@127.0.0.1", "-p", "2222", "-o", "Compression=yes", "-o", "DSAAuthentication=yes", "-o", "LogLevel=FATAL", "-o", "IdentitiesOnly=yes", "-o", "StrictHostKeyChecking=no", "-o", "UserKnownHostsFile=/dev/null", "-i", "/Users/Raven/Vagrant/CentOS7/.vagrant/machines/default/virtualbox/private_key"]
/Users/Raven/.ssh/config: terminating, 1 bad configuration options

After some more fiddling around, trying to get it to work (another full uninstall/reinstall), I'm now getting the following on "vagrant up":

==> default: Rsyncing folder: /Users/Raven/Vagrant/CentOS7/ => /vagrant
There was an error when attempting to rsync a synced folder.
Please inspect the error message below for more info.

Host path: /Users/Raven/Vagrant/CentOS7/
Guest path: /vagrant
Command: "rsync" "--verbose" "--archive" "--delete" "-z" "--copy-links" "--no-owner" "--no-group" "--rsync-path" "sudo rsync" "-e" "ssh -p 2200 -o LogLevel=FATAL  -o ControlMaster=auto -o ControlPath=/var/folders/qj/79b187p94w9clf2s7jxl1pfc0000gn/T/ssh.207 -o ControlPersist=10m  -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i '/Users/Raven/Vagrant/CentOS7/.vagrant/machines/default/virtualbox/private_key'" "--exclude" ".vagrant/" "/Users/Raven/Vagrant/CentOS7/" "vag...@127.0.0.1:/vagrant"
Error: /Users/Raven/.ssh/config: terminating, 1 bad configuration options
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at /BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-51/rsync/io.c(453) [sender=2.6.9]

I haven't modified any of the Vagrantfiles outside of the config.vm.box to point to the version of OS, so as far as I know, this should be the basic installation of the VMs.

I tried looking to see if there were any known bugs that match this issue, and looked on here to see if there was something similar, but I didn't find anything. If anyone has any suggestions for what to try, or if there's any more info I can provide, please let me know.

Thanks,
Kirstin

Alvaro Miranda Aguilera

unread,
Oct 9, 2016, 2:55:34 PM10/9/16
to vagra...@googlegroups.com

On Fri, Oct 7, 2016 at 7:53 AM, Kirstin Veltman <k.l.v...@gmail.com> wrote:
/Users/Raven/.ssh/config: terminating, 1 bad configuration options

Hello

Can create a new user in the host machine and test?

it seems the error is on your user .ssh folder:
/Users/Raven/.ssh/config: terminating, 1 bad configuration options

Alvaro.


--
Alvaro

Kirstin Veltman

unread,
Oct 11, 2016, 2:59:33 AM10/11/16
to Vagrant
Hi Alvaro,

I have now tried that, but it's giving me the same sort of error.

ssh -i /Users/Raven/Vagrant/CentOS7/.vagrant/machines/default/virtualbox/private_key -p 2222 kirstin@localhost

Kirstins-MacBook-Pro:CentOS7 Raven$ ssh -i /Users/Raven/Vagrant/CentOS7/.vagrant/machines/default/virtualbox/private_key -p 2222 kirstin@localhost
/Users/Raven/.ssh/config: line 1: Bad configuration option: useroaming

/Users/Raven/.ssh/config: terminating, 1 bad configuration options

with same result if I use:
ssh -i /Users/Raven/Vagrant/CentOS7/.vagrant/machines/default/virtualbox/private_key -p 2222 -l kirstin vagrant@localhost

I also had a thought that Apple might have done something to harden my local .ssh file, so I ran ssh-keygen to see if adding a local key pair would help when I did "vagrant up" in their process of adding a key pair, but I'm getting the same errors.

My /.ssh/config file is basically empty except for "UseRoaming no"

I understand that with Vagrant you have the ability to set up specific key pairs, but if your Vagrantfile is limited to the default new one, shouldn't it be generating a new pair on its own during "vagrant up"? That's what I thought the following was doing:

    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default:
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default:
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if it's present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...

I also noticed a possible issue with the VirtualBox Guest Additions, so I installed vagrant-vbguest and re-ran "vagrant up". Still getting the "/Users/Raven/.ssh/config: terminating, 1 bad configuration options" error when trying to ssh.

Thanks again for the help!

Kirstin

Alvaro Miranda Aguilera

unread,
Oct 11, 2016, 7:08:36 AM10/11/16
to vagra...@googlegroups.com

On Tue, Oct 11, 2016 at 8:59 AM, Kirstin Veltman <k.l.v...@gmail.com> wrote:
/Users/Raven/.ssh/config: line 1: Bad configuration option: useroaming

Hello

Can you share your .ss/config ?

Its very clear telling us there is an error, and what you copy past it seems have a typo

ie:
useroaming

Can you move the file out of .ssh and then try to make it correct if you require that option?

--
Alvaro

Kirstin Veltman

unread,
Oct 12, 2016, 12:50:57 AM10/12/16
to Vagrant
Hi Alvaro,

I did have the following for the config file:

Kirstins-MacBook-Pro:CentOS7 Raven$ cat /Users/Raven/.ssh/config
UseRoaming no

I tried your suggestion of moving the config file out of the .ssh directory, and did "vagrant up" for the box just to see what would happen, and it worked without error and was able to ssh to the VM! Apparently the issue was with the existence of the ~/.ssh/config file in the ~/.ssh directory entirely. That directory is now empty and I don't appear to be having any more issues (though I haven't tried installing any new VM types).

I'm not sure why this now caused an issue. I didn't make any changes to the ~/.ssh directory or config file when I upgraded to Sierra, so I can only presume it was there prior to the upgrade (my other Mac running Sierra doesn't have a ~/.ssh directory at all, so I don't think Apple added it as a part of Sierra, unless it was a part of not allowing DSA keys). Well, regardless of how it broke, I'm ecstatic it now works!

Thank you for all of your help and suggestions!

Kirstin

Alvaro Miranda Aguilera

unread,
Oct 12, 2016, 1:59:08 AM10/12/16
to vagra...@googlegroups.com
Hello

Here are some hints:

It seems is not longer neeed, but on previous version was like a patch locally set

^ not sure, just thinking loud

Alvaro.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/bc98ff12-c7cc-4d21-81b0-312dc4950bf7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Reply all
Reply to author
Forward
0 new messages