且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在远程服务器上运行本地 python 脚本

更新时间:2023-02-22 21:02:46

可以使用 ssh.Python 接受连字符(-) 作为参数来执行标准输入,

It is possible using ssh. Python accepts hyphen(-) as argument to execute the standard input,

cat hello.py | ssh user@192.168.1.101 python -

运行 python --help 以获取更多信息.

Run python --help for more info.