Score:1

What is a 'known_hosts' file and what does it contains

in flag

I have navigated to /home/some-user/.ssh/ folder and found a file named known_hosts.

What is the purpose of this file and what does it contains?

ar flag
Which version of Ubuntu are you using? Have you googled the term? General questions like this are more suitable for [Security Stack Exchange](https://security.stackexchange.com/questions/20706/what-is-the-difference-between-authorized-keys-and-known-hosts-file-for-ssh)
Score:4
hr flag

The purpose of the known_hosts file is described quite well in man ssh:

 ssh automatically maintains and checks a database containing identifica‐
 tion for all hosts it has ever been used with.  Host keys are stored in
 ~/.ssh/known_hosts in the user's home directory.  Additionally, the file
 /etc/ssh/ssh_known_hosts is automatically checked for known hosts.  Any
 new hosts are automatically added to the user's file.  If a host's iden‐
 tification ever changes, ssh warns about this and disables password
 authentication to prevent server spoofing or man-in-the-middle attacks,
 which could otherwise be used to circumvent the encryption.  The
 StrictHostKeyChecking option can be used to control logins to machines
 whose host key is not known or has changed.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.