使用脚本远程执行 whiptail 脚本

Using script to remotely execute whiptail script

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

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

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

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'

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