Add ssh fingerprint to known_hosts without actually ssh'ing into machine

I am setting up a multi-node hadoop cluster. As a part of this process I need to have all the nodes be able to ssh into each other (this is needed for other parts of the hadoop ecosystem).

I end up having to ssh into each node, then exit, then ssh into the next one, then exit, etc. Then repeat this on each node. Is there a way to do this faster?

Right now I am doing ssh -o StrictHostKeyChecking=no which is better than having to type yes every time, but not ideal.

I'd prefer something like:

[command] localhost

That way I could just throw all the IP's in a script and run the script on every node and save myself a huge chunk of time and tedium.

Any thoughts?


Quite the trend of answering my own questions -

Here's something that works for me: I found you can pass commands with ssh in the format

ssh $host 'command1; command2; command3'

so I am just passing

ssh $host 'exit'

Need Your Help

TSQL in the Command object

.net sql-server tsql

Please see the sub routine below:


php mysql pdo

I'm trying to insert group names into my database. Since they are usergroups I only want to insert them once, so if I accidentally insert them again it should refuse it because It already exists. I'm

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.