Skip to Main Content

Cloud Connectivity

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ssh to compute instance fails with "permission denied"

user-f0m0fSep 2 2023 — edited Sep 2 2023

Since a few days I get an error message when I try to establish an ssh connection to my compute instance "linux4" from the cloud shell or a remote shell. The error message is: "Permission denied (publickey,gssapi-keyex,gssapi-with-mic)".
Until a few days ago (or weeks - I don't know exactly when I last connected successfully), ssh worked fine. While analyzing it, I came across the keyword "FIPS". A new security mechanism that seems to have been introduced on the compute instances and requires the public key to be regenerated (see "https://community.oracle.com/customerconnect/discussion/684402/ssh-fails-with-error-fips-mode-initialized-fips-mode-initialized-ssh-connect-to-host"). For crosschecking I created a new compute instance "linux2" and put the same public key there and ssh works!
My question is now, if FIPS is the cause for the failure, how can I regenerate the key on "linux4" if I can't connect to the machine at all?

# ssh to the elder instance "linux4" fails with "permission denied"
harrdie@cloudshell:~ (eu-frankfurt-1)$ ssh -i .ssh/oracle_cloud_key opc@130.61.61.231
FIPS mode initialized
Enter passphrase for key '.ssh/oracle_cloud_key': 
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
harrdie@cloudshell:~ (eu-frankfurt-1)$ 

# ssh to new instance "linux2" works
harrdie@cloudshell:~ (eu-frankfurt-1)$ ssh -i .ssh/oracle_cloud_key opc@130.61.111.207
FIPS mode initialized
Enter passphrase for key '.ssh/oracle_cloud_key': 
Activate the web console with: systemctl enable --now cockpit.socket

Last login: Sat Sep  2 09:16:35 2023 from 132.145.236.16
[opc@linux2 ~]$ exit
logout
Connection to 130.61.111.207 closed.
Comments
Post Details
Added on Sep 2 2023
1 comment
1,587 views