def rsakeys_hard(root): return """ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAue/SvOXhsUnA6VlJq5mttoY3bE8cMcMcSrtOtDx0ABwXY1/4VFd4TAhpUhlY2oiVHigQlBr/9sdEirH0SLQIO+o/a0am4+JFym7e8GOGzMbebO3p1u7NMq8/0I/YVN/ora4kyhBHmVCq7mZlAGDQhNTEHzWkCtkYWyOiJGRdCO0= roland@stimpy.cope.xs4all.nl """ def dsakeys_hard(root): return """ssh-dss AAAAB3NzaC1kc3MAAACBAO2PpEWM1TexXzegFHfppGBkzFIt+2lV45c0M4rbvkWncrdPaAePR6N8F6BrMpL4BzvL70+k33DTzeIWokYU4KDpaFI9KTUgcf2lGMhB8/24WTZ8L3pvJE5QcLRagLUQD/pel8r+SynaBQv/oSN/A7gTmEQO7INsILtAU/aVgmiRAAAAFQCFNg9Ye2/v5F/f8Q1r+n+HgIuO/wAAAIEA1KanPaKBdaeIGKAF7YrlRKXWxAINk+64E8oNvRs9XXJY4qASyTWpEaTVYfr2w2LfV5lleKA0DLufyGEpgoYw8v6ZTgmiZoRn0Qk+ciVjT/EcKvnMUw87K+QTJTjTffCw0AXgZKrYF1iVMPSv/NnP89j3iw7QYxbVVTqWFIw1TC4AAACAStzkoH5bvOi9qcp4eevedscQRKZeSHsTnMx3okFN3wlgoN9ei1S8Vdi1vwTRFveS36NScss/PH+5dHeKyKz0hGR+476CN/ktPn4tRSor55TQWW2ujbPkpP/WPYQi3vhX6/G4kaR9qhMlpJTdoYu6z6By9yvOtv1iwpHx8M+CXls= lodewijk@reddwarf """ def rsakeys_from_xml(root): r = [] for k in root.authorized_keyss[0].authorized_keys: if k.type == 'rsa': r.append("ssh-rsa %s %s" % (k.__dict__['#texts'][0].strip(), k.who)) return "\n".join(r) def dsakeys_from_xml(root): r = [] for k in root.authorized_keyss[0].authorized_keys: if k.type == 'dss': r.append("ssh-dss %s %s" % (k.__dict__['#texts'][0].strip(), k.who)) return "\n".join(r)