1
回答
piramiko异常:SSH session not active,求大神解答
百度AI开发者大赛带你边学边开发,赢100万奖金,加群:418589053   
deploySHPath = os.path.join(BASE_DIR,"static","constantfiles","jenkins-java-conf.sh")
rollbackSHPath = os.path.join(BASE_DIR,"static","constantfiles","jenkins-java-conf-backup.sh")
list_fail = []
t=paramiko.Transport((ip,SSH_PORT))
key=paramiko.RSAKey.from_private_key_file(PKEY)
sftp=paramiko.SFTPClient.from_transport(t)
sftp.put(deploySHPath,"/tmp/jenkins-java-conf.sh")
sftp.put(rollbackSHPath,"/tmp/jenkins-java-conf-backup.sh")
sftp.put(confPath,"/tmp/%s" % conf_name)
t.close()

#paramiko.SFTPClient.from_transport(t)这行抛出异常,异常信息为:
#SSH session not active
#求大神帮忙解答



举报
chem_dev
发帖于2年前 1回/990阅
顶部