如何在 qnx 上安装 ssh 服务器?

发布于 2024-07-06 04:56:39 字数 68 浏览 6 评论 0原文

我正在使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

清醇 2024-07-13 04:56:39

根据是 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.

眼波传意 2024-07-13 04:56:39

在普通 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

烟酉 2024-07-13 04:56:39

如果你想启动一个SSH服务器来轻松传输文件。 SSH 守护程序 (sshd) 已安装,但缺少“配置”。

  1. 创建密钥(不要使用密码):¹

    随机-t 
      ssh-keygen -t rsa -f /etc/ssh/ssh_host_key -b 1024 
      ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key 
      ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key 
      
  2. 使用密码创建与 root 不同的用户帐户。²

    使用

  3. 将用户添加到 sshd 组:/etc/group => sshd:x:6:user1
  4. 首先执行:/usr/sbin/sshd

对于 QNX 6.6.0,您还必须执行以下操作:

  1. 创建另一个密钥

    ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key 
      

    (仅 QNX 6.6.0 需要生成 ECDSA 密钥 - 另请参阅 此处

  2. 相应地创建文件夹以适合此路径 /var/chroot/sshd/

如果您想使用 SFTP:

  1. 创建/使用文件 /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.

  1. Create the keys (do NOT use a password):¹

    random -t
    ssh-keygen -t rsa -f /etc/ssh/ssh_host_key -b 1024
    ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
    ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
    
  2. Create a user account different from root with a password.²

  3. Add the user to the sshd group in: /etc/group => sshd:x:6:user1
  4. Start by executing: /usr/sbin/sshd

For QNX 6.6.0, you have to do in addition:

  1. Create another key

    ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key
    

    (The ECDSA key generation is only necessary for QNX 6.6.0 - see also here)

  2. Create folders accordingly to fit this path /var/chroot/sshd/

If you want to use SFTP:

  1. Create/Use the file /etc/ssh/sshd_config and enable Subsystem sftp /usr/libexec/sftp-server by adding this line to the file

Some 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

还如梦归 2024-07-13 04:56:39

自 6.4 版本以来,QNX 已删除对软件包的支持。 这意味着很难从第 3 方应用程序 CD 安装 SSH 和 SSL,因为所需的实用程序不再存在。

事实证明他们的qpk文件包实际上只是一个伪装的tgz。 所以你可以做的就是解压 openssl 和 openssh 包。 它将创建一个类似 public/core-//opt 的文件结构
您需要做的就是将 /opt 中的所有内容复制到 /,然后将 /opt/bin:/opt/sbin 添加到您的路径,并将 /opt/lib 添加到您的 LD_LIBRARY_PATH。

其他需要注意的事情是:

  • 你的随机数生成器需要启动(random -t),
  • 如果你想使用服务器,你将需要设置一个新的 /etc/openssh/sshd_config,我从 Ubuntu 机器复制了我的
  • 。需要生成密钥,网上有很多关于执行此操作的信息

根据我的阅读,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:

  • your random number generator needs to be started (random -t)
  • you will need to set up a new /etc/openssh/sshd_config if you want to use the server, I copied mine from a Ubuntu machine
  • You will need to generate keys, there is lots of information on doing this online

From what I have read, QNX 6.4.1 should come pre-installed with ssh. I am yet to confirm this

傾旎 2024-07-13 04:56:39

仅供参考 - 您可以使用“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.

烟花易冷人易散 2024-07-13 04:56:39

按照 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".

橙幽之幻 2024-07-13 04:56:39

QNX 开源应用程序
提供移植的开源
工具/应用程序,包括它们的
完整的来源和/或准备使用
QNX 的二进制文件,例如 XFree86,
Lesstif、DDD、VNC、Nedit 和集群
像 PVM 这样的中间件。

我不知道这意味着什么,但我希望它能给你一些开始的东西。

Open Source Applications for QNX
provides ported open source
tools/applications including their
complete sources and/or ready to use
binaries for QNX, like XFree86,
Lesstif, DDD, VNC, Nedit and cluster
middleware like PVM.

I have no idea what that means, but I hope it gives you something to start with.

烟雨扶苏 2024-07-13 04:56:39

根据 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文