do not write ,,garbage'' to known_hosts file(s)
This commit is contained in:
parent
81f87f1d5e
commit
1b928df15e
|
@ -193,7 +193,6 @@ class SSHClient (object):
|
||||||
self.load_host_keys(self.known_hosts)
|
self.load_host_keys(self.known_hosts)
|
||||||
|
|
||||||
f = open(filename, 'w')
|
f = open(filename, 'w')
|
||||||
f.write('# SSH host keys collected by paramiko\n')
|
|
||||||
for hostname, keys in self._host_keys.iteritems():
|
for hostname, keys in self._host_keys.iteritems():
|
||||||
for keytype, key in keys.iteritems():
|
for keytype, key in keys.iteritems():
|
||||||
f.write('%s %s %s\n' % (hostname, keytype, key.get_base64()))
|
f.write('%s %s %s\n' % (hostname, keytype, key.get_base64()))
|
||||||
|
|
Loading…
Reference in New Issue