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

laramit's avatar

Envoy/SSH permissions

I'm using Windows 10 and Vagrant/Homestead for development and currently do a git push from Homestead and git pull on my Linux production server to deploy changes.

I want to automate things a little more and have been looking at Envoy. I've set up the production server in Envoy.blade.php and tried a simple command but Envoy can't connect to the production server.

I have the production server to only allow SSH with key based authentication but I'm getting a warning in Vagrant that I have an unprotected private key file and permissions 0777 for home/vagrant/.ssh/id_rsa are too open so the key is ignored.

I don't seem able to change the permissions on id_rsa. The chmod command runs OK but the permissions don't actually change. I'm thinking it's probably because Vagrant uses mapped folders and that /home/vagrant is a mapped folder to the Windows host file system so the Linux permissions don't apply. I tried making id_rsa read only in Windows but still get an error that 0555 is too open.

Has anyone found a way around this problem? Do I need to start looking at developing on Linux rather than Homestead on Windows? Or is there a better way I can make deployments easier other than Enyoy?

Thanks.

0 likes
2 replies
michaeldyrynda's avatar
Level 41

Try setting /home/vagrant/.ssh to 700 and all files within it to 600 i.e. only the owner can read, write, and execute the directory (execute is needed to list contents) and only the owner can read and write to files within the directory.

The home directory itself shouldn't be mapped to the host machine, only whatever you have listed in your Homestead.yaml file, which is usually mapped into /home/vagrant/Code.

1 like
laramit's avatar

Thanks! - that's the problem, didn't realise only the code directory needed to be mapped.

I've had all my project directories within /home/vagrant so had that entire directory mapped to the local folders which included /ssh.

Please or to participate in this conversation.