配置 SSH 连接

要保护Qt Creator 与设备之间的连接,请在计算机上安装OpenSSH套件,其中包括sshsftpssh-keygen 工具。

SSH 连接尽可能通过主模式下运行的 OpenSSH 客户端建立。默认情况下,多个会话共享一个 SSH 连接。建立一次连接,然后在后续运行和部署程序中重复使用,可减少连接设置开销,特别是在嵌入式设备上。由于 Windows 不支持连接共享,因此每次部署或运行程序都要创建一个新的 SSH 连接。

设置工具安装目录的路径:

  1. 转到首选项>Devices >SSH

    设备偏好设置中的 SSH 选项卡

  2. 清除Enable connection sharing ,为每个部署和运行程序创建新的 SSH 连接。此选项在不支持连接共享的 Windows 系统上显示为灰色。
  3. Connection sharing timeout 中,以分钟为单位指定重复使用 SSH 连接的超时。
  4. Path to ssh executable 中,输入安装 OpenSSH 可执行文件的目录路径。
  5. Path to sftp executable 中,输入安装 SFTP 可执行文件的目录路径。
  6. Path to ssh-askpass executable 中,输入安装 ssh-askpass 可执行文件的目录路径。通常,您可以使用指向随Qt Creator 提供的工具实现 qtc-askpass 的默认路径。
  7. Path to ssh-keygen executable 中,输入安装 ssh-keygen 可执行文件的目录路径。

另请参阅 《如何:为远程 Linux 开发》和《为远程 Linux 设备开发》

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.