【发布时间】:2012-07-27 02:08:27
【问题描述】:
谁能建议我如何使用 Windows 批处理程序将ssh 发送到远程服务器,然后在那里执行shell scripts?
任何简单的示例对我来说都是很好的开始。
服务器名称:- ares-ingest.vip.host.com
用户名:-uname
密码:-password
由于我是 Windows 批处理程序的新手,任何建议都将不胜感激
更新:-
我尝试使用plink 来执行我在本地机器上的 shell 脚本,但我总是收到如下错误,我做错了什么吗?
C:\PLINK>plink uname@cli.host.com -m email.sh
Using keyboard-interactive authentication.
Password:
Using keyboard-interactive authentication.
Your Kerberos password will expire in 73 days.
sh: HIVE_OPTS= -hiveconf mapred.job.queue.name=hdmi-technology: is not an identifier
以下是我的shell脚本中的内容-
#!/bin/bash
export HIVE_OPTS="$HIVE_OPTS -hiveconf mapred.job.queue.name=hdmi-technology"
hive -S -e 'SELECT count(*) from testingtable2' > attachment.txt
【问题讨论】:
标签: windows shell batch-file