我正在尝试从跳转服务器连接到远程服务器。它完美地连接到远程服务器,但是当我尝试在远程服务器上运行python脚本时,它说找不到目录。请帮忙
gateway_session = SSHSession('host',
'unman', password='password').open()
# from jump server, establish connection with a remote server
remote_session = gateway_session.get_remote_session('host',
'username',password='password')
print(gateway_session.get_cmd_output('python /Folder/test.py'))
首先尝试检查您的位置:
这样,您就知道在
/
处是否确实存在Folder
{a1}加上{a2}:
OP补充道:
相关问题 更多 >
编程相关推荐