Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oracle Cloud: Permission denied (publickey,gssapi-keyex,gssapi-with-mic)

I created an new Oracle cloud Linux instance, downloaded the private and public keys on creation, and now I cannot access it. I followed the guides and searched around, but I can mostly just find people who got their keys mixed up, which I have double-checked.

It shows as running, but if I try to SSH by doing:

ssh -i ssh-key-2022-09-18.key [email protected]

Then I get:

Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

Any help?

like image 670
Nick Sephton Avatar asked Oct 21 '25 05:10

Nick Sephton


1 Answers

If you have used the OCI auto generated keys during Instance Creation then the default username is opc and not ops as mentioned in your question.

You will only be able to connect via SSH only if the keys are not misplaced as there is no way to retrieve the private key after the instance is created.

In case you have misplaced the keys then to upload new keys you will have to work with the boot volume (refer this answer How do you change the public key of a Oracle Cloud Instance? for more details on how to add new SSH key)

Note: To access OCI Instance, there are many other prerequisites like having public IP or accessing via bastion, etc. Please review this https://docs.oracle.com/en-us/iaas/Content/Compute/Tasks/accessinginstance.htm document for more details.

like image 142
Ameen Ali Shaikh Avatar answered Oct 27 '25 02:10

Ameen Ali Shaikh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!