如何在 qnx 上安装 ssh 服务器?
我正在使用 qnx 设备,并且我希望能够通过 ssh 进入它。 有人有关于启动和运行 openSSH 之类的入门知识吗?
I'm working on a qnx device, and I want to be able to ssh into it. Does anyone have a primer on getting something like openSSH up and running?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
根据是 6.2、6.3 还是 6.4,您实际上会以不同的方式进行处理。
6.2 在 Photon 中有“安装程序”或“从 QNX 安装软件”,这是一个 GUI 程序,可以让您下载并安装它,类似于 Fedora 的 Pup、YaST 等。 等效的命令行是 cl-installer。
6.3 没有 6.2 包文件系统,但如果需要的话支持它。 在 6.3 上,最简单的方法是从 http://download.qnx 获取 6.2 的软件包。 com/contrib/repository621a/ ,解压它(它只是一个 tarball) - 您应该能够弄清楚哪个文件在哪里。
6.4 支持 pkgsrc,这将是我首选的方式。
Depending on whether it's 6.2, 6.3 or 6.4 you will actually go about it in a different manner.
6.2 has "Installer" or "Install Software from QNX" in Photon, a GUI program that lets you download and install it kind of like Fedora's Pup, YaST or the likes. The command-line equivalent is cl-installer.
6.3 does not have the 6.2 package filesystem, but supports it if needed. On 6.3, the easiest way would be to get the 6.2's package from http://download.qnx.com/contrib/repository621a/ , unpack it (it's just a tarball) - you should be able to figure out which file goes where.
6.4 has support for pkgsrc which would be my preferred way of doing it there.
在普通 6.5、6.5.0SP1 或 6.6 系统上,您所需要做的就是创建密钥:
ssh-keygen -tdsa -f /etc/ssh/ssh_host_dsa_key
ssh-keygen -trsa -f /etc/ssh/ssh_host_rsa_key
然后启动sshd服务器(需要指定完整路径):
/usr/sbin/sshd
如果出现问题,请在启用调试输出的情况下启动服务器,问题应该会变得明显:
/usr/sbin/sshd -ddd
On a stock 6.5, 6.5.0SP1 or 6.6 system all you need to do is create your keys:
ssh-keygen -tdsa -f/etc/ssh/ssh_host_dsa_key
ssh-keygen -trsa -f/etc/ssh/ssh_host_rsa_key
Then start the sshd server (you need to specify the full path):
/usr/sbin/sshd
If something isn't working start the server with debug output enabled and the problem should become obvious:
/usr/sbin/sshd -ddd
如果你想启动一个SSH服务器来轻松传输文件。 SSH 守护程序 (sshd) 已安装,但缺少“配置”。
创建密钥(不要使用密码):¹
使用密码创建与 root 不同的用户帐户。²
使用
/etc/group
=>sshd:x:6:user1
/usr/sbin/sshd
对于 QNX 6.6.0,您还必须执行以下操作:
创建另一个密钥
(仅 QNX 6.6.0 需要生成 ECDSA 密钥 - 另请参阅 此处)
相应地创建文件夹以适合此路径
/var/chroot/sshd/
如果您想使用 SFTP:
/etc/ssh/sshd_config
并启用Subsystem sftp /usr/libexec/sftp-server
通过将此行添加到文件中还介绍了一些步骤 此处有关 sshd 命令的 QNX 手册。
1 此处:文件夹
ssh/
已在/etc/
中创建,并确保这些文件属于运行 sshd 的用户!² (即默认情况下禁用通过 ssh 的直接 root 访问,但可以通过在
/etc/ssh/sshd_config
中指定PermitRootLogin yes
来启用)文件If you want to start a SSH server to transfer files easily. The SSH daemon (sshd) is already installed, but the 'configuration' is missing.
Create the keys (do NOT use a password):¹
Create a user account different from root with a password.²
/etc/group
=>sshd:x:6:user1
/usr/sbin/sshd
For QNX 6.6.0, you have to do in addition:
Create another key
(The ECDSA key generation is only necessary for QNX 6.6.0 - see also here)
Create folders accordingly to fit this path
/var/chroot/sshd/
If you want to use SFTP:
/etc/ssh/sshd_config
and enableSubsystem sftp /usr/libexec/sftp-server
by adding this line to the fileSome steps are also covered here on the QNX manual about sshd command.
¹ Here: the folder
ssh/
was created in/etc/
and make sure the files belong to the user running the sshd!² (i.e. direct root access via ssh is disabled by default but can be enabled by specifying
PermitRootLogin yes
in the/etc/ssh/sshd_config
) file自 6.4 版本以来,QNX 已删除对软件包的支持。 这意味着很难从第 3 方应用程序 CD 安装 SSH 和 SSL,因为所需的实用程序不再存在。
事实证明他们的qpk文件包实际上只是一个伪装的tgz。 所以你可以做的就是解压 openssl 和 openssh 包。 它将创建一个类似 public/core-//opt 的文件结构
您需要做的就是将 /opt 中的所有内容复制到 /,然后将 /opt/bin:/opt/sbin 添加到您的路径,并将 /opt/lib 添加到您的 LD_LIBRARY_PATH。
其他需要注意的事情是:
根据我的阅读,QNX 6.4.1 应该预装 ssh。 我还没有确认这一点
QNX have removed support for packages since version 6.4. This means that it is difficult to install SSH and SSL from the 3rd Party Applications CD, because the utilities required arent there anymore.
It turns out their qpk file package is really just a tgz in disguise. So what you can do is untar the openssl and openssh packages. It will create a file structure like public/core-//opt
All you need to do is copy all of the contents from /opt to /, and then add /opt/bin:/opt/sbin to your path, and /opt/lib to your LD_LIBRARY_PATH.
Other things to note are:
From what I have read, QNX 6.4.1 should come pre-installed with ssh. I am yet to confirm this
仅供参考 - 您可以使用“inetd”启动 telnet,它可以让您启动,并启动 ftp,以便您可以移动 ssh 库等。
FYI - you can start telnet with "inetd" which gets you on, and gets ftp started so you can then move the ssh libs on etc.
按照 qnx 网站上提供的步骤进行操作后(单击 此处)您需要从 sshd_config 文件(位于 /etc/ssh 下)停用 PAM 模块。 将行“UsePAM yes”更改为“UsePAM no”。
Once you followed the steps presented on qnx website (click here) you need to deactivate the PAM module from sshd_config file (under /etc/ssh). Change the line "UsePAM yes" to "UsePAM no".
我不知道这意味着什么,但我希望它能给你一些开始的东西。
I have no idea what that means, but I hope it gives you something to start with.
根据 this 您应该能够从第 3 方 CD 安装它Rom,也可在此处获取:第 3 方应用程序。 这需要使用 qnxinstall 应用程序。
According to this you should be able to install it from the 3rd Party CD Rom, also available here: 3rd Party Apps. This requires the use of the qnxinstall app.