I am not able to SSH into my GCP server . I have been getting Permission denied (publickey)
. I have tried by deleting all SSH keys, restarting the server, increased storage, up-used startup script, and tagged new firewall rules also but still unable to SSH into my server.

- 113
- 3

- 1
- 1
-
Maybe have a look through this page and see if you can find a match there: https://cloud.google.com/compute/docs/troubleshooting/troubleshooting-ssh – Kolban Jun 20 '22 at 04:48
1 Answers
This document describes common errors that you may run into when connecting to virtual machine (VM) instances using SSH, ways to resolve errors, and methods for diagnosing failed SSH connections.
This error can occur for several reasons. The following are some of the most common causes of this error:
You used an SSH key stored in metadata to connect to a VM that has OS Login enabled. If OS Login is enabled on your project, your VM doesn't accept SSH keys that are stored in metadata. If you aren't sure if OS Login is enabled.
To resolve this issue, try one of the following:
Connect to your VM using the Google Cloud console or the Google Cloud CLI. Add your SSH keys to OS Login Disable OS Login.
Or
You can check this documentation as to how the same concern was resolved.

- 356
- 2
- 7