dongyongmin5711 2017-12-12 07:31 采纳率: 100%
浏览 46

在没有ssh的本地服务器上执行脚本

There is a local area network, machines are in same address space.

I have one manager node which controls other machines. Is there a way to execute a script on any of these machines? (Note: SSH is not enabled and we cannot install any code on these machines except manager machine)

Currently, its done by opening a http session in browser, and then providing username and password, followed by the buttons on the page for each script. I need to automate this in Go. Is this possible?

Eg of one such button:

`<form ACTION="enableSsh.cgi" method="get">
    <b>
        <input type="SUBMIT" VALUE="Enable SSH Service">
        <input type=hidden name=stamp value="########">
        <input type=hidden name=token value="********">
        <input type=hidden name=frame value="$%$%$%$%">
    </b>
</form>`
  • 写回答

2条回答 默认 最新

  • dongpan1365 2017-12-12 07:50
    关注

    Currently, its done by opening a http session in browser, and then providing username and password, followed by the buttons on the page for each script. I need to automate this.

    I think you don't need to care about interface at all, until you find a way to execute scripts in backend. From my point of view, it's impossible to execute scripts on the machine without setting up at least SSHD on them. To have your script executed, you need to have some kind of server working on remote machine to handle your requests.

    Also, have a look at Configuration Management Systems, such as: Ansible, SaltStack, and so on, because even SSH seems to be a too low-level tool for your use-case.

    评论

报告相同问题?

悬赏问题

  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 划分vlan后不通了
  • ¥15 GDI处理通道视频时总是带有白色锯齿
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大