Forums

Mansoor
Mansoor
Offline
Resolved
0 votes
I just got a strange message when I was trying to login! I launched the macOS Terminal app and typed:
$ ssh user@clearOSdomain.com

I didn't get the usual password prompt, instead I got this message:
Unable to negotiate with 192.168.1.2 port 22: no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1

I searched the Internet and found that passing the argument "-oKexAlgorithms=+diffie-hellman-group1-sha1" to the ssh command would pass this message. But when I tried to login with the said argument, I got this message:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
SHA256:qWRhA3Y948bweEJTLMOuYCH6IFUMm9QiA0lnSF6bR0Y.
Please contact your system administrator.
Add correct host key in /Users/mac/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/mac/.ssh/known_hosts:56
RSA host key for aratab.com has changed and you have requested strict checking.
Host key verification failed.

I have not done anything to the server since I last successfully logged to it yesterday. And the auto-update is turned off. The client also (the macOS system) hasn't been changed as well. Is there something fishy going on in my server?
Tuesday, July 28 2020, 09:13 PM
Share this post:
Responses (2)
  • Accepted Answer

    Mansoor
    Mansoor
    Offline
    Tuesday, July 28 2020, 11:33 PM - #Permalink
    Resolved
    0 votes
    I changed the default SSH port and tried to login again. The SSH wouldn't connect without "-oKexAlgorithms=+diffie-hellman-group1-sha1", but when I use this parameter, the SSH refuses to log me in! I can login from the server console directly (keyboard and monitor connected to the server), but not remotely over SSH!
    The reply is currently minimized Show
  • Accepted Answer

    Mansoor
    Mansoor
    Offline
    Wednesday, July 29 2020, 12:31 AM - #Permalink
    Resolved
    0 votes
    I ended up deleting /etc/ssh config files and reinstalling ssd. Everything seems to be working now.
    The reply is currently minimized Show
Your Reply