0

When I SSH from macOS 13 (Ventura):

sudo ssh -i /path/to/my_id_rsa abc123@xx.xx.xxx.xx

I’m asked for a password when there is none on this key.

When I use the same my_id_rsa file on Filezilla SFTP I can access the server.

When I run:

sudo scp ~/.ssh/my_id_rsa.pub abc123@xx.xx.xxx.xx:

It returns:

Unable to negotiate with xx.xx.xxx.xx port 22: no matching host key type found. Their offer: ssh-rsa,ssh-rsa-cert-v01@openssh.com,ssh-dss scp: Connection closed

How can I overcome this error?

Giacomo1968
  • 53,069
  • 19
  • 162
  • 212
t q
  • 293
  • 2
  • 5
  • 15
  • SSH-specific terminology: a key file may be protected by a *passphrase*. *Password* is an authentication method other than a key. If you are asked for a password then it's not "on this key". – Kamil Maciorowski Nov 06 '22 at 19:55
  • @KamilMaciorowski i've tried entering system password but this results: `Unable to negotiate with xx.xx.xxx.xx port 22: no matching host key type found. Their offer: ssh-rsa,ssh-rsa-cert-v01@openssh.com,ssh-dss` – t q Nov 06 '22 at 19:58
  • 1
    Does https://superuser.com/a/1749370/1686 answer this? – u1686_grawity Nov 06 '22 at 19:59
  • 3
    Does this answer your question? [Git SSH "permission denied" in macOS 13 Ventura](https://superuser.com/questions/1749364/git-ssh-permission-denied-in-macos-13-ventura) – Giacomo1968 Nov 06 '22 at 20:00
  • This is not a password issue but an SSH protocol issue. Read the error. It states, “no matching host key type found.” It is a host key issue because the destination server is out of date and only uses older/insecure protocols. This is a known issue in the question I and @user1686 linked to. – Giacomo1968 Nov 06 '22 at 20:03
  • followed instructions and now i get `kex_exchange_identification: read: Connection reset by peer` – t q Nov 06 '22 at 21:50
  • Edit your `.ssh/known_hosts` file to remove the server you are having issues with. Then SSH again. You will be asked to verify the key is for the server, answer “Yes!” and you should be fine. If not, there are deeper issues that might only be solved if you update the server’s base OS to a more modern version. – Giacomo1968 Nov 06 '22 at 22:10

0 Answers0