can not use DSSKey to login

Bug #1807870 reported by Liu Lei
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Rally
Fix Released
Undecided
chenhb

Bug Description

If i pass a dss key to the method _get_pkey of class sshutils.SSH, it will raise ssh error "Invalid pkey".

in the method, the key is a file obj, it will be read in the "key_class.from_private_key" on the first loop to check rsa key, but nothing will be read from the key on the second loop

def _get_pkey(self, key):
    if isinstance(key, six.string_types):
        key = six.moves.StringIO(key)
    errors = []
    for key_class in (paramiko.rsakey.RSAKey, paramiko.dsskey.DSSKey):
        try:
            return key_class.from_private_key(key)
        except paramiko.SSHException as e:
            errors.append(e)
    raise exceptions.SSHError("Invalid pkey: %s" % (errors))

chenhb (chen-haibing1)
Changed in rally:
assignee: nobody → chenhb (chen-haibing1)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to rally (master)

Fix proposed to branch: master
Review: https://review.openstack.org/632046

Changed in rally:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to rally (master)

Reviewed: https://review.openstack.org/632046
Committed: https://git.openstack.org/cgit/openstack/rally/commit/?id=cc6f877f5d855ca8adde1cb48caf544bcb969c75
Submitter: Zuul
Branch: master

commit cc6f877f5d855ca8adde1cb48caf544bcb969c75
Author: chenhb <email address hidden>
Date: Mon Jan 21 17:49:49 2019 +0800

    Fix the issues of dss key in ssh utils

    It can not load dss key in ssh utils because of the file cursor
    position.

    Change-Id: Id358673e58565cae73ac39d1f11f5e8edeab4e67
    Closes-Bug: #1807870

Changed in rally:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/rally 1.4.0

This issue was fixed in the openstack/rally 1.4.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.