.ssh/known_hosts

I’m surprised I cannot find “known_hosts”. —
I was looking intensively. I have to delete SSH access in it

`

What is in /etc/hosts?

There are no the keys for sshconnection.
I’ve to look here:
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
This file i cannot find nowhere.

If you want to prevent access, it would be better to delete the key on the server, and not on the client.
Edit: you want to remove or add a key? And why in the root home and not in your home folder?

3 Likes

Are you using root account? :thinking:

If not, better try searching here:

ls -l ~/.ssh/known_hosts

3 Likes

The known_hosts file is created by SSH itself. SSH then writes the host name and a cryptographic key to this file so that it can be identified later.

This file is created when you successfully establish a connection to the host and answer yes to SSH’s question about whether it should remember this host.

I recommend the man pages of ssh and known_hosts
A Google search will find detailed information about ssh in any language.

SSH access is not controlled by known_hosts, but by authorized_keys

This is also explained in the SSH manual and the ArchLinux wiki.

I think you may have to do some reading :wink:

:footprints:

5 Likes

What is the issue that you are facing?
What is the underlying problem?
What are you trying to do which apparently does not work the way you expect it to work?

1 Like

Abandoned topic (60+ days)