Vagrant ssh ask for password











up vote
1
down vote

favorite












I have been following this doc on Vagrant.



I installed VirtualBox and Vagrant, then created a folder and ran vagrant init and vagrant up. When I typed vagrant ssh I got this message:



The private key to connect to the machine via SSH must be owned
by the user running Vagrant. This is a strict requirement from
SSH itself. Please fix the following key to be owned by the user
running Vagrant:

/media/***/Vagrant/.vagrant/machines/default/virtualbox/private_key


I have read some article related to this problem. I think I have to add the key to my system or something about verifying the key. But I am not clear about the most solutions. Anyway, it would be nice if someone could give me a solution for this.



Also when I try to access my virtual running os from VirtualBox UI it ask for username and password. But while I was setting up vagrant and VirtualBox I did not insert any username or password. So I don't know why it is asking for username and password.










share|improve this question
























  • yes I have hidden my username. but my username is 'shahin' and above command give results 'drwxrwxrwx 1 root root 4096 Mar 11 12:03 . '
    – user1670773
    Mar 11 '16 at 11:11






  • 1




    ok, and what is the result of ls -l /media/shahin/Vagrant/.vagrant/machines/default/virtualbox/private_key?
    – techraf
    Mar 11 '16 at 11:15






  • 1




    What exactly is /media? Isn't it a mountpoint for an external disk. What filesystem do you use on that disk?
    – techraf
    Mar 11 '16 at 11:29















up vote
1
down vote

favorite












I have been following this doc on Vagrant.



I installed VirtualBox and Vagrant, then created a folder and ran vagrant init and vagrant up. When I typed vagrant ssh I got this message:



The private key to connect to the machine via SSH must be owned
by the user running Vagrant. This is a strict requirement from
SSH itself. Please fix the following key to be owned by the user
running Vagrant:

/media/***/Vagrant/.vagrant/machines/default/virtualbox/private_key


I have read some article related to this problem. I think I have to add the key to my system or something about verifying the key. But I am not clear about the most solutions. Anyway, it would be nice if someone could give me a solution for this.



Also when I try to access my virtual running os from VirtualBox UI it ask for username and password. But while I was setting up vagrant and VirtualBox I did not insert any username or password. So I don't know why it is asking for username and password.










share|improve this question
























  • yes I have hidden my username. but my username is 'shahin' and above command give results 'drwxrwxrwx 1 root root 4096 Mar 11 12:03 . '
    – user1670773
    Mar 11 '16 at 11:11






  • 1




    ok, and what is the result of ls -l /media/shahin/Vagrant/.vagrant/machines/default/virtualbox/private_key?
    – techraf
    Mar 11 '16 at 11:15






  • 1




    What exactly is /media? Isn't it a mountpoint for an external disk. What filesystem do you use on that disk?
    – techraf
    Mar 11 '16 at 11:29













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I have been following this doc on Vagrant.



I installed VirtualBox and Vagrant, then created a folder and ran vagrant init and vagrant up. When I typed vagrant ssh I got this message:



The private key to connect to the machine via SSH must be owned
by the user running Vagrant. This is a strict requirement from
SSH itself. Please fix the following key to be owned by the user
running Vagrant:

/media/***/Vagrant/.vagrant/machines/default/virtualbox/private_key


I have read some article related to this problem. I think I have to add the key to my system or something about verifying the key. But I am not clear about the most solutions. Anyway, it would be nice if someone could give me a solution for this.



Also when I try to access my virtual running os from VirtualBox UI it ask for username and password. But while I was setting up vagrant and VirtualBox I did not insert any username or password. So I don't know why it is asking for username and password.










share|improve this question















I have been following this doc on Vagrant.



I installed VirtualBox and Vagrant, then created a folder and ran vagrant init and vagrant up. When I typed vagrant ssh I got this message:



The private key to connect to the machine via SSH must be owned
by the user running Vagrant. This is a strict requirement from
SSH itself. Please fix the following key to be owned by the user
running Vagrant:

/media/***/Vagrant/.vagrant/machines/default/virtualbox/private_key


I have read some article related to this problem. I think I have to add the key to my system or something about verifying the key. But I am not clear about the most solutions. Anyway, it would be nice if someone could give me a solution for this.



Also when I try to access my virtual running os from VirtualBox UI it ask for username and password. But while I was setting up vagrant and VirtualBox I did not insert any username or password. So I don't know why it is asking for username and password.







ssh vagrant






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 11 '16 at 10:54









techraf

4,115102139




4,115102139










asked Mar 11 '16 at 10:32









user1670773

126114




126114












  • yes I have hidden my username. but my username is 'shahin' and above command give results 'drwxrwxrwx 1 root root 4096 Mar 11 12:03 . '
    – user1670773
    Mar 11 '16 at 11:11






  • 1




    ok, and what is the result of ls -l /media/shahin/Vagrant/.vagrant/machines/default/virtualbox/private_key?
    – techraf
    Mar 11 '16 at 11:15






  • 1




    What exactly is /media? Isn't it a mountpoint for an external disk. What filesystem do you use on that disk?
    – techraf
    Mar 11 '16 at 11:29


















  • yes I have hidden my username. but my username is 'shahin' and above command give results 'drwxrwxrwx 1 root root 4096 Mar 11 12:03 . '
    – user1670773
    Mar 11 '16 at 11:11






  • 1




    ok, and what is the result of ls -l /media/shahin/Vagrant/.vagrant/machines/default/virtualbox/private_key?
    – techraf
    Mar 11 '16 at 11:15






  • 1




    What exactly is /media? Isn't it a mountpoint for an external disk. What filesystem do you use on that disk?
    – techraf
    Mar 11 '16 at 11:29
















yes I have hidden my username. but my username is 'shahin' and above command give results 'drwxrwxrwx 1 root root 4096 Mar 11 12:03 . '
– user1670773
Mar 11 '16 at 11:11




yes I have hidden my username. but my username is 'shahin' and above command give results 'drwxrwxrwx 1 root root 4096 Mar 11 12:03 . '
– user1670773
Mar 11 '16 at 11:11




1




1




ok, and what is the result of ls -l /media/shahin/Vagrant/.vagrant/machines/default/virtualbox/private_key?
– techraf
Mar 11 '16 at 11:15




ok, and what is the result of ls -l /media/shahin/Vagrant/.vagrant/machines/default/virtualbox/private_key?
– techraf
Mar 11 '16 at 11:15




1




1




What exactly is /media? Isn't it a mountpoint for an external disk. What filesystem do you use on that disk?
– techraf
Mar 11 '16 at 11:29




What exactly is /media? Isn't it a mountpoint for an external disk. What filesystem do you use on that disk?
– techraf
Mar 11 '16 at 11:29










1 Answer
1






active

oldest

votes

















up vote
0
down vote













If you are trying to mount the vagrant box off of NTFS, it is not possible to change the owner of the key file.



If you want to mount the file on NTFS and you are running a local instance you can try the following which worked for me:



Vagrant Halt



[remove the vagrant box]



[Add the following line to Vagrantfile]
config.ssh.insert_key=false



[** you may need to remove and clone your project again]



Vagrant Provision



This solution may not be suitable for a live instance - it uses the default insecure ssh key. If you require more security you might be able to find a more palatable soultion here https://www.vagrantup.com/docs/vagrantfile/ssh_settings.html






share|improve this answer





















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "106"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f269126%2fvagrant-ssh-ask-for-password%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    If you are trying to mount the vagrant box off of NTFS, it is not possible to change the owner of the key file.



    If you want to mount the file on NTFS and you are running a local instance you can try the following which worked for me:



    Vagrant Halt



    [remove the vagrant box]



    [Add the following line to Vagrantfile]
    config.ssh.insert_key=false



    [** you may need to remove and clone your project again]



    Vagrant Provision



    This solution may not be suitable for a live instance - it uses the default insecure ssh key. If you require more security you might be able to find a more palatable soultion here https://www.vagrantup.com/docs/vagrantfile/ssh_settings.html






    share|improve this answer

























      up vote
      0
      down vote













      If you are trying to mount the vagrant box off of NTFS, it is not possible to change the owner of the key file.



      If you want to mount the file on NTFS and you are running a local instance you can try the following which worked for me:



      Vagrant Halt



      [remove the vagrant box]



      [Add the following line to Vagrantfile]
      config.ssh.insert_key=false



      [** you may need to remove and clone your project again]



      Vagrant Provision



      This solution may not be suitable for a live instance - it uses the default insecure ssh key. If you require more security you might be able to find a more palatable soultion here https://www.vagrantup.com/docs/vagrantfile/ssh_settings.html






      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        If you are trying to mount the vagrant box off of NTFS, it is not possible to change the owner of the key file.



        If you want to mount the file on NTFS and you are running a local instance you can try the following which worked for me:



        Vagrant Halt



        [remove the vagrant box]



        [Add the following line to Vagrantfile]
        config.ssh.insert_key=false



        [** you may need to remove and clone your project again]



        Vagrant Provision



        This solution may not be suitable for a live instance - it uses the default insecure ssh key. If you require more security you might be able to find a more palatable soultion here https://www.vagrantup.com/docs/vagrantfile/ssh_settings.html






        share|improve this answer












        If you are trying to mount the vagrant box off of NTFS, it is not possible to change the owner of the key file.



        If you want to mount the file on NTFS and you are running a local instance you can try the following which worked for me:



        Vagrant Halt



        [remove the vagrant box]



        [Add the following line to Vagrantfile]
        config.ssh.insert_key=false



        [** you may need to remove and clone your project again]



        Vagrant Provision



        This solution may not be suitable for a live instance - it uses the default insecure ssh key. If you require more security you might be able to find a more palatable soultion here https://www.vagrantup.com/docs/vagrantfile/ssh_settings.html







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Oct 2 '16 at 0:33









        Chris McCowan

        11




        11






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f269126%2fvagrant-ssh-ask-for-password%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Morgemoulin

            Scott Moir

            Souastre