1
回答
piramiko异常:SSH session not active,求大神解答
利用AWS快速构建适用于生产的无服务器应用程序,免费试用12个月>>>   
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
#求大神帮忙解答



举报
单蛙
发帖于1年前 1回/570阅
顶部