1
我无法运行位于具有参数的“admin”服务器上的远程shell脚本。使用ssh参数运行远程bash脚本
ssh [email protected] "~/bin/addautomaps $groupentry $homeentry $ticket"
“groupentry” 和 “homeentry” 是如下
user1:*:52940:OWNER-user1
user1 -rw,intr,hard,rsize=32768,wsize=32768 basinas01:/ifs/basinas01/home/&
脚本位于在管理服务器〜/斌/ addautomaps。
我看到错误,
tput: No value for $TERM and no -T specified
我也看到了同样的参数不正确传递。 我也尝试过使用“ssh -t ...”但这不起作用。
试试这个: 'ssh koliwada @ admin script -c“〜/ bin/addautomaps $ groupentry $ homeentry $ ticket”/ dev/null' – anishsane
@anishsane:你能解释一下你的答案背后的基本原理吗? – Inian
我的不好。从'man script':'脚本的内壳总是交互式的'。所以以'-c'传递的命令在交互式shell中运行。 – anishsane