From 114109dbf4094ae6b6333d41c84bebf6f85c4e48 Mon Sep 17 00:00:00 2001 From: Thierry Carrez Date: Thu, 13 Sep 2012 14:07:02 +0200 Subject: [PATCH] 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 --- nova/crypto.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nova/crypto.py b/nova/crypto.py index a5126ae8f29e..cd2080c1a108 100644 --- a/nova/crypto.py +++ b/nova/crypto.py @@ -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)