本页面

为 VxWorks 设备创建 SSH 连接

要在 VxWorks 设备上运行 SSH 服务器,需要对其进行配置,具体步骤如下。

注意: 启用 VxWorks 插件以使用它。

配置 VxWorks 源代码构建

在 VxWorks 源代码构建 (VSB) 中设置以下密钥:

"USER_MANAGEMENT"
"USER_MANAGEMENT_USER_PRIVILEGES"

配置 VxWorks 内核

将以下内容添加到 VxWorks 内核配置 (VIP):

"INCLUDE_IPSSH_CLIENT_CMD"
"INCLUDE_SHELL_SECURITY"
"INCLUDE_USER_DATABASE"
"INCLUDE_USER_IDENTIFICATION"
"INCLUDE_USER_PRIVILEGES"
"INCLUDE_USER_MGT_SHELL_CMD"
"INCLUDE_SEC_KEY_STORE_CMD"
"INCLUDE_SHELL"
"INCLUDE_SSH"
"INCLUDE_IPD_CMD"

创建启动脚本

在启动脚本中,设置用户管理和启动 SSH 服务器。

启动脚本示例:

cp "/romfs/ssh/keys/WindRiver.pk2","/ram"
cmd keyStore import default_rsa /romfs/ssh/keys/default_rsa.pem
cmd keyStore import default_dsa /romfs/ssh/keys/default_dsa.pem
cmd ipd start ipssh
udbReset
userAdd "WindRiver","vxTarget"

测试连接

要从终端测试连接,请为其指定密钥算法(因为 VxWorks 使用旧密钥):

ssh -oHostKeyAlgorithms=+ssh-rsa -lWindRiver 192.168.0.3

另请参阅 启用和禁用插件如何:VxWorks调试Qt for VxWorks

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.