在远程服务器上执行本地的shell脚本

在远程服务器上执行本地的shell脚本


[root@localhost zzx]# sh echoip.sh
192.168.67.131
[root@localhost zzx]# ssh root@192.168.67.129 -C "/bin/bash" < echoip.sh
root@192.168.67.129's password:
192.168.67.129
[root@localhost zzx]#

原文地址:https://www.cnblogs.com/hanxing/p/7588965.html