Wandering SSH Right Access

I am new to Vagrant and getting the following error on vagrant up or vagrant ssh :

 The private key to connect to this box via SSH has invalid permissions set on it. The permissions of the private key should be set to 0600, otherwise SSH will ignore the key. Vagrant tried to do this automatically for you but failed. Please set the permissions on the following file to 0600 and then try running this command again: [...]/.vagrant/machines/default/virtualbox/private_key 

I launched:

 $ sudo chmod 666 [...]/.vagrant/machines/default/virtualbox/private_key 

I also tried (600, 777), but still getting the same error.

Please someone tell me what is wrong and how to fix it?

+5
source share
4 answers

Got this error using otto (which layers are on stray ones) This is due to the def file system, it has a thick partition that allows it to be used with windows (previously used). When permissions cannot be set in the section, I simply copied the entire directory into my user directory (as always).

Used git, so I just reset to go back to go back to my starting place ... re-ran: otto compile otto dev now works.

0
source

I had this problem and worked on it by moving the private_key file to another location, changing its resolution, and then creating a symbolic link in the original location. Thus,

 $ mv [...]/.vagrant/machines/default/virtualbox/private_key /some/path/where/you/can/change/permissions $ ln -s /some/path/where/you/can/change/permissions [...]/.vagrant/machines/default/virtualbox/private_key 
+11
source

I had the same problem and it turned out that chmod is working fine, but doesn’t really change the permissions, my files are on the NTFS partition, try changing them to ext4 or similar

+1
source

I have the same error. The problem arose because I was trying to do vagrant up in the NTFS partition, like the error message. So I decided to create a link to a directory in my ext4 section and a link to simbloc in my NTFS to solve this problem. Works well now!

Thanks!

+1
source

Source: https://habr.com/ru/post/1209993/


All Articles