有人可以建议我如何使用Windows批处理程序ssh
到远程服务器,然后在那里执行shell scripts
吗?
任何简单的示例都将对我有所帮助。
服务器名称: - ares-ingest.vip.host.com
用户名: - uname
密码: - password
任何建议都将受到赞赏,因为我是Windows Batch Program的新手
更新: -
我尝试使用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