clientthread.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:pysshrp 作者: ybulach 项目源码 文件源码
def check_auth_password(self, username, password):
        self.logger.info('%s:%d: trying password authentication for "%s"' % (self.client_address + (username,)))

        # Check the username
        upstream = self._findUpstream(username)
        if not upstream:
            return paramiko.AUTH_FAILED

        # Local authentication
        if upstream.password and not (upstream.password == password):
            self.logger.critical('%s:%d: local authentication of "%s" failed' % (self.client_address + (username,)))
            return paramiko.AUTH_FAILED

        # Connect to the upstream
        if not upstream.upstream_password:
            upstream.upstream_password = password
        return self._connectToUpstream(upstream, password=True)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号