Vishesh Duggar bio photo

Vishesh Duggar

CTO Software @vamstar. 15 years in tech. Entrepreneurial with a keen interest in product development and usability. Interested in working on high impact ideas.

Subscribe to my mailing list

Are you looking for a tech advisor or a CTO?

Contact on LinkedIn

Vamstar LinkedIn Twitter Github
Picture by Linux Screenshots on Flickr.

I am trying to setup Docker with Vagrant on Mac OS using Docker Toolbox.

1. Keeps asking for docker password

==> default: Syncing folders to the host VM...
    default: The machine you're rsyncing folders to is configured to use
    default: password-based authentication. Vagrant can't script rsync to automatically
    default: enter this password, so you'll likely be prompted for a password
    default: shortly.
    default:
    default: If you don't want to have to do this, please enable automatic
    default: key insertion using `config.ssh.insert_key`.
    default: Rsyncing folder: /Workspace/projectfolder/ => /var/lib/docker/docker_1453133500_23726
docker@127.0.0.1's password:
    default: Rsyncing folder: /Workspace/projectfolder/ => /var/lib/docker/docker_build_2a2a4a6d8df9e0e02790023811cfe9f9
docker@127.0.0.1's password:

The default password for the user docker is tcuser. I got a little confused since it asked me for the password twice. But obviously since it is the same account docker@127.0.0.1 as you can see in the last two lines above. You should enter the same password. This answer saved me http://stackoverflow.com/a/24376512/1297190. As mentioned in the answer, this is mentioned in the boot2docker documentation but if you took the Docker Toolbox route you might miss it.

2. Finally after Vagrant is up, SSH Exception

After Vagrant is up, I get the following exception:

packet_stream.rb:206:in `poll_next_packet': padding error, need 413195797 block 16 (Net::SSH::Exception)
	from /opt/vagrant/embedded/gems/gems/net-ssh-3.0.1/lib/net/ssh/transport/packet_stream.rb:92:in `next_packet'
	from /opt/vagrant/embedded/gems/gems/net-ssh-3.0.1/lib/net/ssh/transport/session.rb:185:in `block in poll_message'
	from /opt/vagrant/embedded/gems/gems/net-ssh-3.0.1/lib/net/ssh/transport/session.rb:180:in `loop'
	from /opt/vagrant/embedded/gems/gems/net-ssh-3.0.1/lib/net/ssh/transport/session.rb:180:in `poll_message'
	from /opt/vagrant/embedded/gems/gems/net-ssh-3.0.1/lib/net/ssh/connection/session.rb:463:in `dispatch_incoming_packets'
	from /opt/vagrant/embedded/gems/gems/net-ssh-3.0.1/lib/net/ssh/connection/session.rb:222:in `preprocess'
	from /opt/vagrant/embedded/gems/gems/net-ssh-3.0.1/lib/net/ssh/connection/session.rb:206:in `process'
	from /opt/vagrant/embedded/gems/gems/net-ssh-3.0.1/lib/net/ssh/

Turns out this is because of a timing issue and you can simply ignore this and try

vagrant ssh

Please share your Docker Toolbox woes in the comments section below. Hope this helps!

Close to 15 years in tech; I've served as a CTO and advisor to multiple organizations. Brought close to 20 products to market. As a founding member of multiple organizations I've done everything from tech to stratgey, sales, marketing, hiring, accounting and more. Experience in a variety of technologies including but not limited to AWS, Node, React, Serverless, ElasticSearch, Groovy, Java, Typescript, Angular, Grails, PHP, Drupal, Wordpress.

Always interested in looking at new tech, strategy and ways I can add value to organizations.

[Contact me.](https://www.linkedin.com/in/experienced-cto/).