Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试编写一个 bash 脚本来自动在网络中的客户端计算机中执行操作。但是在代码之后
ssh -i ~/.ssh/key root@machine
bash 程序刚刚停止 我可以做些什么来将命令发送到远程机器?谢谢
就像您直接调用 bash 一样。
ssh ... somescriptontheserver.sh ssh ... ls -lR / ssh ... << EOF ls -lR / EOF