1

谁能建议我如何使用 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
4

1 回答 1

1

尝试使用plink发送您的命令。

Usage: plink [options] [user@]host [command]
于 2012-07-27T02:15:39.073 回答