未findSSH -i命令

我想要从服务器1运行位于服务器2上的脚本。

我在服务器1上运行这个命令行:

/home/user_x/keys.pem -t -t [email protected] sudo /home/gather/scripts/startTomcat6_nonroot.sh

哪给我这个错误:

/home/user_y/tomcat/bin/startup.sh:第11行:uname:command not found

以下是服务器2上包含uname命令的该文件的片段:

#!/bin/sh os400=false darwin=false #line bellow is number 11, the one failing case "`uname`" in CYGWIN*) cygwin=true;; OS400*) os400=true;; Darwin*) darwin=true;; esac 

最可能的原因是服务器2上的$PATH不包含uname ; 在用户下login时检查环境variables。