本页内容

建立与 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”“调试”“VxWorks 开发”以及“VxWorks 版 Qt”

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.