Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9224193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T04:15:27+00:00 2026-06-18T04:15:27+00:00

I use Vagrant to create a CentOS VM on Windows host and connect to

  • 0

I use Vagrant to create a CentOS VM on Windows host and connect to it, so far so good.

Next I want to use Chef to provision stacks on VM that was created. I tried with local directory cookbooks as well as providing urls to recipes, but that probably fails because it can’t ssh to guest box, as seen from error:


SSH authentication failed! This is typically caused by the public/private
keypair for the SSH user not being properly set on the guest VM. Please
verify that the guest VM is setup with the proper public key, and that
the private key path for Vagrant is setup properly as well.

So my first question is:

1) How do I make sure SSH works within same window that brought up guest OS in Windows Host so that all scripts execute well?

Now when I comment below line in vagrantfile

config.ssh.username = "root"

Above error goes away, but I get another error:


The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mount -t vboxsf -o uid=id -u vagrant,gid=id -g vagrant v-csr-2 /tmp/vagrant-chef-1/chef-solo-2/roles

Which is because the user vagrant does not have enough access on box, which is my second question:

2) How do instruct Vagrant to run all commands with sudo or su access?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T04:15:29+00:00Added an answer on June 18, 2026 at 4:15 am

    Here is how I managed to get SSH working:

    install cygwin (http://www.cygwin.com/)

    setup openssh from within cygwin

    add ~/.ssh/id_rsa_vagrant

    download from here

    modify ~/.ssh/config

    Host localhost
    IdentityFile ~/.ssh/id_rsa_vagrant

    modify rights on ssh directory

    chmod 600 ~/.ssh/*

    Everything should be working fine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use vagrant to test my chef recipes. The issue is that I have
I use Vagrant and Chef to create new servers when I am developing. I
I'm using chef-solo with vagrant Chef defaults to root for everything. I want to
I'm getting an error when I am trying to use Vagrant/Chef for setting up
I'm trying to use vagrant to set up a dev environment that automatically clones
I use vagrant and chef to develop my own blog in a virtual machine.
use C#,want to upload excel file on google doc. bellow syntax use to upload
I'm trying to use a newer Python (2.7.3) with an old CentOS. I have
I'm looking for a way to pass parameter to Chef cookbook like: $ vagrant
Use-case: 1. Create a '.XiB' based UI control consisting of several basic UI elements

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.