Score:1

ssh with StrictHostKeyChecking

gu flag

When I am connecting the other machine with ssh, every time I answered this question with yes/no -

user@computer$ ssh user@host
This host key is known by the following other names/addresses
  ~/.ssh/known_hosts:xx: [hashed name]
  ~/.ssh/known_hosts:xx: [hashed name]
Are you sure you want to continue connecting (yes/no/[fingerprint])? 

then, I gave the yes for all the time, then only I can able to access the other machine

I get to know that there is a parameter in ssh to remove this question while connecting through ssh which is StrictHostKeyChecking=accept-new and it worked, I just simply enters the password without answering the above question.

I go through few answers, but i dont get the full clarity

Does using ssh with StrictHostKeyChecking=accept-new is same as giving yes in the above question?

I dont know about the other machines[about trust], but I definitely need to access using ssh and answer the above question as yes and enters the password and I do my job.

Is there any other way to remove this question while connecting ssh?

Thanks

Score:1
ph flag
qbi

If you set StrictHostKeyChecking to accept-new, SSH will add new keys to your hosts file. It would be the same like setting StrictHostKeyChecking to no and always connecting to a new host. In both cases SSH will automatically add the key. However if a host is known and it changes its keys (created new keys, man in the middle, etc.) than the setting accept-new will not permit a connection to this host, while the setting no will allow it.

When you set StrictHostKeyChecking to yes you'll have to manually update your known hosts file. The second example above will fail and in the first example SSH will not make a connection to that host.

I sit in a Tesla and translated this thread with Ai:

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.