在Python解释器中运行以下命令时,一切正常,但作为脚本运行时失败。不知何故,这条已开放的隧道没有被认出。任何提示都将不胜感激。你知道吗
翻译:
gateway = subprocess.Popen("ssh -N sshgw", shell=True)
scp_prod = "scp -r server:/NFS/{0} .".format(filePath)
subprocess.call(scp_prod, shell=True)
gateway.kill()
脚本:
try:
gateway = subprocess.Popen("ssh -N sshgw", shell=True)
scp_prod = "scp -r server:/NFS/{0} .".format(filePath)
subprocess.call(scp_prod, shell=True)
finally:
gateway.kill()
目前没有回答
相关问题 更多 >
编程相关推荐