Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

vrekker's avatar

Vagrant Up, not working - Path to your private key?

Hi I´m using Windows 10 pro I have installed composer and homestead.

But when I try to launch "Vagrant up" I get this error message:

"Check your Homestead.yaml (or Homestead.json) file, the path to your private key does not exist."

Although I have generated keys.

I haven´t found any solution on this issue. Any suggestions? Best regards

0 likes
8 replies
Sinnbeck's avatar

Ok. Check if it exists then. Go to C:\Users\USER_NAME\.ssh and see of the files are there. Look for id_rsa and id_rsa.pub

If they are there, please post the homestead config :) Perhaps the paths are wrong in there

authorize: c:/Users/USER_NAME/.ssh/id_rsa.pub
keys:
 — c:/Users/USER_NAME/.ssh/id_rsa
vrekker's avatar

Ok, I have been using hours to figure this out. Here is the key generating procedure: D:\Homestead~\Homestead>ssh-keygen -t rsa -b 4096 -C "[email protected]" Generating public/private rsa key pair. Enter file in which to save the key (C:\Users\User/.ssh/id_rsa): sshfile sshfile already exists. Overwrite (y/n)? y Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in sshfile. Your public key has been saved in sshfile.pub. The key fingerprint is: SHA256:MWvErLS4n/6r7ve10kmnYOsRvBU2OdrWvLGNiJNEymw [email protected] The key's randomart image is: +---[RSA 4096]----+ | | | o . | | . * . * | | o * B + * | | . o E = + + | | . o .oB...* | | . .*=o++ .| | . .. o++. | | +B+o+o.. | +----[SHA256]-----+

D:\Homestead~\Homestead>

And I am still unable to locate the file! (C:\Users\User/.ssh/id_rsa): I´m getting confused due to the forward slash in the file path: (C:\Users\User/.ssh/id_rsa) It seems like there is minor detail I´m not seeing...

Sinnbeck's avatar

Can you try showing your homestead config file?

vrekker's avatar

I have set all to installation default :

ip: "192.168.0.18" memory: 2048 cpus: 2 provider: Hyperv

authorize: ~/.ssh/id_rsa.pub

keys: - ~/.ssh/id_rsa

folders: - map: ~/code to: /home/vagrant/code

sites: - map: homestead.test to: /home/vagrant/code/public

databases: - homestead

features: - mariadb: false - ohmyzsh: false - webdriver: false

_# ports: _# - send: 50000 _# to: 5000 _# - send: 7777 _# to: 777 _# protocol: udp

Sinnbeck's avatar

Replace these two lines that are linux syntax (replace USER_NAME with your actual username)

authorize: ~/.ssh/id_rsa.pub
keys: 
  - ~/.ssh/id_rsa

//with
authorize: c:/Users/USER_NAME/.ssh/id_rsa.pub
keys:
  - c:/Users/USER_NAME/.ssh/id_rsa

Please or to participate in this conversation.