Skip to content
Browse files

node/install.d/etc/ssh/ssh_known_hosts:

Nodes should see frontend as a known host
  • Loading branch information...
1 parent 06720d9 commit c777fa46fe42a73f39f52405446e076b61e6013d @jonanh jonanh committed Apr 14, 2012
Showing with 13 additions and 0 deletions.
  1. +13 −0 share/node/install.d/etc/ssh/ssh_known_hosts(edit)
View
13 share/node/install.d/etc/ssh/ssh_known_hosts(edit)
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# Adds the frontend as a known host
+
+sys_hostname=$(hostname)
+
+key=$(awk '{print $2}' /etc/ssh/ssh_host_rsa_key.pub)
+
+sed '/^${sys_hostname}\s/d' ${FILE}
+sed '/${key}/d' ${FILE}
+
+echo "${sys_hostname} ssh-rsa ${key}" >> ${FILE}
+

0 comments on commit c777fa4

Please sign in to comment.
Something went wrong with that request. Please try again.