Remove spaces from Sahara key comment
This is breaking nova keypair creation and seems to be a regression in nova (https://bugs.launchpad.net/nova/+bug/1481084) According to the sshd man page the optional key comment field should be ignored. Change-Id: I5e6f03c7a7848b049766a57e2a30d0819b58904f
This commit is contained in:
parent
93f92068f0
commit
2341faf8bc
@ -28,7 +28,7 @@ class CryptoTest(testtools.TestCase):
|
||||
self.assertIn('-----BEGIN RSA PRIVATE KEY-----', kp[0])
|
||||
self.assertIn('-----END RSA PRIVATE KEY-----', kp[0])
|
||||
self.assertIn('ssh-rsa ', kp[1])
|
||||
self.assertIn('Generated by Sahara', kp[1])
|
||||
self.assertIn('Generated-by-Sahara', kp[1])
|
||||
|
||||
def test_to_paramiko_private_key(self):
|
||||
pk_str = c.generate_key_pair()[0]
|
||||
|
@ -42,7 +42,7 @@ def generate_key_pair(key_length=2048):
|
||||
'-N', '', # w/o passphrase
|
||||
'-t', 'rsa', # create key of rsa type
|
||||
'-f', keyfile, # filename of the key file
|
||||
'-C', 'Generated by Sahara' # key comment
|
||||
'-C', 'Generated-by-Sahara' # key comment
|
||||
]
|
||||
if key_length is not None:
|
||||
args.extend(['-b', key_length])
|
||||
|
Loading…
Reference in New Issue
Block a user