Vagrant with ProxyCommand in ~/.ssh/config

480 views
Skip to first unread message

Raghavan Srinivas

unread,
Aug 18, 2014, 5:35:13 PM8/18/14
to vagra...@googlegroups.com
I am using a ProxyCommand in ~/.ssh/config as below. I use vpcpublic as a hop for SSHing into the 10.0.0.* servers.

Host 10.0.0.*

        ForwardAgent yes

        ProxyCommand ssh -i /Users/rags/keys/id_rsa -l root vpcpublic nc %h 22


The ssh (part of vagrant up) never completes. Ofcourse it never completes without the lines in the config file either (since I am hopping via the vpcpublic node)

The relevant snippets from vagrant up --debug is as below

DEBUG ssh: == Net-SSH connection debug-level log START ==

DEBUG ssh: D, [2014-08-18T16:56:34.678540 #87694] DEBUG -- net.ssh.transport.session[80b3475c]: establishing connection to 10.0.0.126:22


DEBUG ssh: == Net-SSH connection debug-level log END ==

 INFO retryable: Retryable exception raised: #<Errno::ENETUNREACH: Network is unreachable - connect(2)>

 INFO ssh: Attempting to connect to SSH...

 INFO ssh:   - Host: 10.0.0.126

 INFO ssh:   - Port: 22

 INFO ssh:   - Username: root

 INFO ssh:   - Password? false

 INFO ssh:   - Key Path: ["/Users/rags/keys/id_rsa"]


However when I do a vagrant ssh after the instance it's up, I am fine. Same with being able to ssh to root as well.

vagrant ssh

Last login: Mon Aug 18 21:03:08 2014 from 10.0.0.210

[root@ip-10-0-0-126 ~]#

$ vagrant ssh-config

Host default

  HostName 10.0.0.126

  User root

  Port 22

  UserKnownHostsFile /dev/null

  StrictHostKeyChecking no

  PasswordAuthentication no

  IdentityFile /Users/rags/keys/id_rsa

  IdentitiesOnly yes

  LogLevel FATAL


Is there anything I need to do in terms of the config.ssh.proxy_command (I tried various logical combinations but that did not seem to work -- is there an example out there? :-))

Thanks!

Rags




Alvaro Miranda Aguilera

unread,
Aug 18, 2014, 8:31:15 PM8/18/14
to vagra...@googlegroups.com
what provider/plugin are you using?

virtualbox/vmware/plugin....


--
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+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raghavan Srinivas

unread,
Aug 19, 2014, 9:57:37 AM8/19/14
to vagra...@googlegroups.com
I am using this on AWS. So, AWS plugin from mac.

Rags

POFlynn

unread,
Jun 24, 2015, 6:27:29 PM6/24/15
to vagra...@googlegroups.com
I have exactly the same issue, also using AWS. Did you ever fix this?

POFlynn

unread,
Jun 24, 2015, 8:45:35 PM6/24/15
to vagra...@googlegroups.com
Hmmm the exact same Vagrantfile works ok for me in Linux but not Windows, I'm happy to switch....
Reply all
Reply to author
Forward
0 new messages