Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hi @rahulna.
The error in this case seems to be that the keys were generated by the root user, but they need to be accessible by the web server group/owner, usually - www-data. To confirm this, you can try and use the file_get_contents method and dump the result from the command using var_dump most probably it would say it doesn’t have enough permissions.
I’ll recommend configuring the key’s ownership and permissions to be accessible from the user that’s being used by your WebService -either Apache or Nginx.
Regards, KDSys
I was able to resolve this issue by not using a passphrase!
I generated a new key with no passphrase.
I think this is a bug with ssh2_auth_pubkey_file function.
Thank you