1

When it comes to the use of ssh service (client & server), I'm quite confused as to the use of these two files, :

  • authorized_keys
  • known_hosts

what's the difference between them? what are their similarities (if any)?which one's on the server-side and which one's on client-ssh?

any help is highly appreciated. Thanks in advance.

0

1 Answer 1

5

authorized_keys is a file that allows you to add ssh public keys of users that should be allowed to log into your server (the server in which the authorized_keys file lives) using key based auth.

known_hosts is a file that contains a list of keys from...known hosts that you have logged into. These keys pair an IP address with a server's key to help prevent you from logging into an impersonated server. Usually these keys will be setup the first time you log into a host but you can also manually configure these if security is very critical in your environment.

2
  • do they both exist on the server side? Are they both are under ~/.ssh/ ? Commented Jul 21, 2021 at 7:07
  • They both exist on all machines that have openssh Commented Jul 21, 2021 at 11:25

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.