Error while SSH using terminal : Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

The below error occuring while using terminal to SSH (IP , and keys are modified for privacy reason )


can you anyone suggest the fix



ann@Ann-MacBook-Pro ~ % ssh root@192.00.15.00   

The authenticity of host '192.00.15.00   (192.00.15.00   )' can't be established.

ED57519 key fingerprint is SHA256:Y6/nvS246mJqW3xo1MqU765DpwdySGhr02bjY4G3cVE.

This key is not known by any other names

Are you sure you want to continue connecting (yes/no/[fingerprint])? yes

Warning: Permanently added '192.00.15.00 ' (ED57519) to the list of known hosts.

root@192.00.15.00 : Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

ann@Ann-MacBook-Pro ~ % 





MacBook Pro 13″, macOS 13.5

Posted on Sep 10, 2023 6:15 AM

Reply
Question marked as Top-ranking reply

Posted on Sep 10, 2023 7:03 AM

Hi ebinvthomas,


It appears that the host you're trying to connect to (192.0.15.0) is only configured with public-key authentication. This means that you'll need to have a corresponding private key file on your Mac. If you don't have this private key available, contact the administrator of the system you're trying to connect to.


If you do have the right private key file, you'll need to specify it when connecting to the server. Try this command instead:

ssh -i "/path/to/privatekey" root@192.0.15.0


Make sure to replace "/path/to/privatekey" with the real path to your private key. If you don't know the right path, type "ssh -i", add a space, then drag the private key file into the Terminal window.


If you administer the remote system you're trying to reach and don't have the right public key, DigitalOcean has a good article on how to set up public-key authentication. Step 1 should be done directly on your Mac (the client): https://www.digitalocean.com/community/tutorials/how-to-configure-ssh-key-based-authentication-on-a-linux-server

Similar questions

1 reply
Question marked as Top-ranking reply

Sep 10, 2023 7:03 AM in response to ebinvthomas

Hi ebinvthomas,


It appears that the host you're trying to connect to (192.0.15.0) is only configured with public-key authentication. This means that you'll need to have a corresponding private key file on your Mac. If you don't have this private key available, contact the administrator of the system you're trying to connect to.


If you do have the right private key file, you'll need to specify it when connecting to the server. Try this command instead:

ssh -i "/path/to/privatekey" root@192.0.15.0


Make sure to replace "/path/to/privatekey" with the real path to your private key. If you don't know the right path, type "ssh -i", add a space, then drag the private key file into the Terminal window.


If you administer the remote system you're trying to reach and don't have the right public key, DigitalOcean has a good article on how to set up public-key authentication. Step 1 should be done directly on your Mac (the client): https://www.digitalocean.com/community/tutorials/how-to-configure-ssh-key-based-authentication-on-a-linux-server

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Error while SSH using terminal : Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.