Overload comment in generated SSH keys
Overload comment in generated SSH keys in order not to leak information about the user and host that actually generated them. Patch based on a suggestion by Pedro Perez. Fixes bug 1050347. Change-Id: I73bbdba1f6c9e83a5e7e70564959b9d7abaa5e29
This commit is contained in:
parent
0296a2d249
commit
114109dbf4
@ -141,7 +141,7 @@ def generate_key_pair(bits=1024):
|
|||||||
with utils.tempdir() as tmpdir:
|
with utils.tempdir() as tmpdir:
|
||||||
keyfile = os.path.join(tmpdir, 'temp')
|
keyfile = os.path.join(tmpdir, 'temp')
|
||||||
utils.execute('ssh-keygen', '-q', '-b', bits, '-N', '',
|
utils.execute('ssh-keygen', '-q', '-b', bits, '-N', '',
|
||||||
'-t', 'rsa', '-f', keyfile)
|
'-t', 'rsa', '-f', keyfile, '-C', 'Generated by Nova')
|
||||||
fingerprint = _generate_fingerprint('%s.pub' % (keyfile))
|
fingerprint = _generate_fingerprint('%s.pub' % (keyfile))
|
||||||
if not os.path.exists(keyfile):
|
if not os.path.exists(keyfile):
|
||||||
raise exception.FileNotFound(keyfile)
|
raise exception.FileNotFound(keyfile)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user