1

We will be migrating to a new server and copying all our accounts over to it. The issue we are encountering is now: There is a large number of ssh accounts and they require us typing yes on the initial connection from the new server. Is there a way to copy over the accounts to the new linux server so that we aren't prompted to type 'yes' on the initial connection?

sebix
  • 4,175
  • 2
  • 25
  • 45
Allen
  • 13
  • 2

2 Answers2

2

You could copy the old ssh host key to the new server:

https://www.ibm.com/developerworks/community/blogs/brian/entry/ssh_host_keys_know_when_to_keep_em_and_when_to_change_them4?lang=en

dmourati
  • 24,720
  • 2
  • 40
  • 69
  • This works, but it's a bad idea. Better idea would be to push the new host key to the clients using whatever configuration management they've got on the clients. Of course, it's not half as bad an idea as disabling Host Key checking... – Chris S Nov 03 '14 at 16:47
  • I go with the approach of keeping the keys the same when migrating from the old system to new. There could be processes or clients whose systems are out of your jurisdiction and can't be managed by a central config management system. – ewwhite Nov 03 '14 at 17:31
1

Add -o StrictHostKeyChecking=no to your ssh command and you wont be prompted the question.

Hrvoje Špoljar
  • 5,162
  • 25
  • 42