capsulecorp-pentest
capsulecorp-pentest copied to clipboard
Invalid permmissions on SSH private key
Got it now thanks guys! I see the pentest box in VB
now im getting this error when i run "vagrant provision pentest" 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
I copied ssh/capsulecorp_id_rsa to /home/[username]/ssh/capsulecorp_id_rsa and im trying to point the Vagrantfile.
Originally posted by @bobsm1th in https://github.com/R3dy/capsulecorp-pentest/issues/25#issuecomment-826490531
You should be able to fix this with chmod 0600 /path/to/capsulecorp_id_rsa
@R3dy I experienced the same issue when using NTFS as the underlying filesystem for the vagrant data folder ($VAGRANT_HOME
) but using a Linux machine.
Even after changing box.ssh.private_key_path
in Vagrantfile
, and then even after forcefully shutting down the VM (vagrant could not shutdown normally without ssh connection) and re-upping it didn't work. The file insecure_private_key
in the NTFS partition was asked to be set with the right ownership and/or permissions...
I managed to solve the issue by creating a linux symlink to $HOME/.ssh/capsulecorp_id_rsa
for insecure_private_key
in the NTFS directory, thus
ln -sr ~/.ssh/capsulecorp_id_rsa insecure_private_key
I still had to pip install pywinrm
though (despite not running OSX).