SSH.py 文件源码

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

项目:Skynet2.0 作者: Skynet2-0 项目源码 文件源码
def connect(self, sshhost = None, user = None, pwd = None, port = None):
        """
        Connects this instance with the instance sshhost over SSH.

        username -- the user and pwd is the password.
        Port -- the port number to connect to.
        See SSHClient.connect for more information on optional parameters
        that can be set when using the underlying layer instead of this one.
        """
        if sshhost is None:
            sshhost = self.sshhost
        if user is None:
            user = self.username
        if pwd is None:
            pwd = self.pwd
        if port is not None:
            self.client.connect(sshhost, username = user, password = pwd, port=port)
        else:
            self.client.connect(sshhost, username = user, password = pwd)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号