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:
Thierry Carrez 2012-09-13 14:07:02 +02:00
parent 0296a2d249
commit 114109dbf4
1 changed files with 1 additions and 1 deletions

View File

@ -141,7 +141,7 @@ def generate_key_pair(bits=1024):
with utils.tempdir() as tmpdir:
keyfile = os.path.join(tmpdir, 'temp')
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))
if not os.path.exists(keyfile):
raise exception.FileNotFound(keyfile)