Unofficial archive. This is a read-only, community-run archive of the Apple Support Community. It is not affiliated with or endorsed by Apple Inc.

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 [email protected]   

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.

[email protected] : Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

ann@Ann-MacBook-Pro ~ % 





1 reply

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" [email protected]


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