【问题标题】:Using script to remotely execute whiptail script使用脚本远程执行whiptail脚本
【发布时间】:2017-12-25 11:04:26
【问题描述】:

我正在尝试通过 ssh 远程执行包含whiptail 的bash 脚本。问题是 ssh 不会显示任何whiptail UI。

在本地计算机上显示鞭尾提示的最佳方式是什么?

脚本是远程服务器上的交互式脚本,需要通过本地计算机上的脚本触发(并且提示需要由用户回答)。

【问题讨论】:

    标签: bash shell ssh remote-access whiptail


    【解决方案1】:

    this 是你说的 Whiptail 吗?

    要与基于文本的 UI (TUI) 交互,您需要像这样使用 -t 标志运行 ssh

    ssh -t user@host.name 'whiptail --title "Example Dialog" --msgbox "This is an example of a message box. You must hit OK to continue." 8 78'
    

    上面的命令经过测试可以工作。请注意,您必须将整个命令放在引号中,尤其是。如果它有标志。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-06-02
      • 2011-11-24
      • 1970-01-01
      • 1970-01-01
      • 2022-10-12
      相关资源
      最近更新 更多