python结构挂起在bashscript上不会返回obj

2024-04-26 17:45:37 发布

您现在位置:Python中文网/ 问答频道 /正文

我有一个脚本,将挂起结构连接 这是我的职责

c=Connection(host=address , user=host_user, port=22,connect_kwargs = {'key_filename':key_filename1} )
            scriptfile=open(script)
            output=c.run(scriptfile.read(),hide=True)
            print(output.stdout)

我的脚本将服务器作为进程运行:

if [ "$iface" != "lo" ] ; then

           iperf3 -s -B 192.168.$x.$base -p 500$x &

           x=$((x+1))
fi

我怎样才能解决这个问题


Tags: key脚本hostoutputportaddressconnectconnection