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.
ssh vagrant
add a comment |
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.
ssh vagrant
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 ofls -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
add a comment |
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.
ssh vagrant
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
ssh vagrant
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 ofls -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
add a comment |
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 ofls -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
add a comment |
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
add a comment |
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
add a comment |
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
add a comment |
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
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
answered Oct 2 '16 at 0:33
Chris McCowan
11
11
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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