@cryptotaxi247 / infra-1 / commits / 4e9605ee

Add a newline to the ssh keys to make sure they match the old style

Graham Christensen committed Oct 6, 2019 at 21:55 UTC 4e9605ee8d73e011d654c1cca7a90beaa54085f5
1 file changed +6 -1
hydra-packet-importer/import.py
+6 -1
@@ -66,7 +66,12 @@ def get_device_key(manager, device):
66 # will return None because we never reach this message.
67 return ssh_key
68 if event['type'] == 'user.1001':
69 - ssh_key = event['body']
69 + ssh_key_parts = event['body'].rsplit(" ", 1)
70 + if len(ssh_key_parts) == 2:
71 + ssh_key = ssh_key_parts[0] + "\n"
72 + else:
73 + debug("# Skipped due keyscan failed to split on ' '")
74 +
75 return None
76
77 def main(config):