Fix base64 encoding of server key

Change-Id: Ifc5d39f5a3d4f175ea149bcabbfa8c6c67b4df0b
This commit is contained in:
David Shrewsbury 2017-05-26 11:41:34 -04:00
parent 08926eb1de
commit da3b769e1a
1 changed files with 1 additions and 5 deletions

View File

@ -16,7 +16,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import base64
import errno import errno
import ipaddress import ipaddress
import time import time
@ -94,9 +93,6 @@ def keyscan(ip, timeout=60):
# Paramiko, at this time, seems to return only the ssh-rsa key, so # Paramiko, at this time, seems to return only the ssh-rsa key, so
# only the single key is placed into the list. # only the single key is placed into the list.
if key: if key:
keys.append( keys.append("%s %s" % (key.get_name(), key.get_base64()))
"%s %s" % (key.get_name(),
base64.encodestring(str(key)).replace('\n', ''))
)
return keys return keys