Benches macOS

1

Terminal - ssh - REMOTE HOST IDENTIFICATI…

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

I am trying to do some command line networking, but when I type ssh root@"devices ip address" it comes up with the error:

lucas-computer:~ LukeB$ ssh [email protected]

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

@ 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 the RSA host key has just been changed.

The fingerprint for the RSA key sent by the remote host is

fd:07:34:3b:d1:76:1e:c2:e7:95:14:d3:b2:23:47:7f.

Please contact your system administrator.

Add correct host key in /Users/LukeB/.ssh/known_hosts to get rid of this message.

Offending key in /Users/LukeB/.ssh/known_hosts:4

RSA host key for 10.0.1.6 has changed and you have requested strict checking.

Host key verification failed.

I know for a fact nobody is "doing anything nasty" so am not worried, but when I go to add the key to known hosts I type: /Users/LukeB/.ssh/known_hosts

into terminal and receive the error:

lucas-computer:~ LukeB$ /Users/LukeB/.ssh/known_hosts

-bash: /Users/LukeB/.ssh/known_hosts: Permission denied

Why is this as I am a system admin?

Can anybody tell me very simply how to add the correct host key to known hosts?

Thanks

1 reply

Sign in or join Beachball Help to reply.

  1. 0

    brainslice

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Whoa, you're playing around a root and you don't know what's going on here? I would highly recommend some more reading up on things.

    Typing "/Users/LukeB/.ssh/known_hosts" into Terminal won't do squat, and it shouldn't either.

    known_hosts is just a plain text file with the RSA keys of remote hosts that you have connected to previously.

    Did you happen to reinstall the system or muck around with the sshd configuration on the remote machine you're trying to connect to? Or is this perhaps a different machine with the same IP address as the machine that you have in your known_hosts?

    At any rate, you can just clean out the known_hosts file and the warning will go away and allow you to connect.

    Open up Terminal and do:

    echo "" > .ssh/known_hosts

    (note that the above is two sets of quotes)