How do you install an ssh server on qnx?
Asked Answered
B

8

10

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?

Bernt answered 29/9, 2008 at 21:21 Comment(0)
W
5

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.

Woven answered 7/7, 2010 at 18:10 Comment(0)
L
13

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

Leucocratic answered 14/5, 2015 at 18:52 Comment(2)
I missed that inconspicuous (1) footnote and the ssh-keygen commands failed without my noticing. As a result, I had to do the instructions twice (after getting to the bottom and creating /etc/ssh). Nonetheless, these instructions are great!Fresnel
These commands needed to be run from Linux machine from where one wants to do ssh to QNX device ?Vervet
C
8

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

Clino answered 26/6, 2009 at 0:12 Comment(2)
QNX 6.5 comes with pre-installed sshd but it has to be configured properly: profetes.pl/2010/03/13/configure-qnx-6-4-1-sshdLiken
There are also packages for openssh in the NETBSD collection netbsd.org/docs/software/packages.htmlClino
W
5

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.

Woven answered 7/7, 2010 at 18:10 Comment(0)
P
5

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

Ponzo answered 31/1, 2014 at 15:52 Comment(0)
C
2

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.

Christianism answered 4/10, 2008 at 2:46 Comment(0)
E
1

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.

Evangel answered 30/9, 2008 at 0:14 Comment(0)
V
1

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

Vehicle answered 21/5, 2020 at 17:26 Comment(0)
T
0

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.

Tyrrell answered 23/6, 2011 at 8:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.