Reputation: 169
I have accidentally changed permission of the .ssh folder to 600 and now I am not able to log in to the GCP server through SSH as it's giving me permission denied error.
**Connection Failed**
You cannot connect to the VM instance because of an unexpected error. Wait a few moments and then try again.
I tried multiple options like, ssh troubleshooting instance, enabling serial console, ssh private key login.
Thanks you in advance.
Upvotes: 0
Views: 637
Reputation: 169
Thank you guys for all your support, my problem got solved by follwing below document: Serial Console with local password using a startup script
Upvotes: 0
Reputation: 3234
One of the simple ways to fix this would be to use a startup script. In this script just execute chmod 700 /path/to/your/.ssh
.
The startup scripts are executed with root privileges, so it should be able to fix your problem with .ssh folder permissions.
So, what you need to do:
Upvotes: 2