OpenSSH SSH daemon


sshd [-46Ddeiqt] [-b bits] [-f config_file]
     [-g login_grace_time] [-h host_key_file]
     [-k key_gen_time] [-o option] [-p port]
     [-u len]

Runs on:

QNX Neutrino


See sshd in the NetBSD documentation.


The sshd (OpenSSH Daemon) is the daemon program for ssh. Together, these programs replace rlogin and rsh, and provide secure encrypted communications between two untrusted hosts over an insecure network. For more information, see sshd in the NetBSD documentation.

Setting up SSH access to a QNX Neutrino target

Here's how you can enable access via SSH and SFTP on a "plain" system that doesn't have telnet or similar configured. A writable POSIX filesystem is a requirement (, fs-qnx6, devf*, or fs-etfs*), and it must be mounted under /.

  1. Add the following lines to your mkifs buildfile (if they aren't there already):
    • In the boot script:
      random -p
    • In the library section (before [data=c]):
    • In the binary section (after [data=c]):
      /etc/inetd.conf = {
      ssh stream tcp nowait root /usr/sbin/sshd in.sshd -i
      /etc/services = {
      ssh 22/tcp
      /etc/ssh/sshd_config = {
      Protocol 2
      LoginGraceTime 600
      PermitRootLogin yes
      PasswordAuthentication yes
      PermitEmptyPasswords yes
      Subsystem	sftp	/usr/libexec/sftp-server
      # These env vars will be set when you login via ssh; adjust as needed:
      /etc/profile = {
  2. Generate a new OS image.
  3. Boot your QNX Neutrino target with the new boot image, and then do the following:
    1. Create a writeable /etc directory for /etc/passwd, and /etc/ssh/ for the keys to be generated:
      mkdir /etc
      mkdir /etc/ssh
    2. Make the root user "exist" from the rights-management perspective, so you can create keys:
      mkdir /root
      echo root::0:0::/root:/bin/sh > /etc/passwd
    3. Use passwd to set up a password.
    4. Create an entry for "privilege separation user sshd" and append it to the passwd file:
      echo sshd:x:15:6:sshd:/var/chroot/sshd:/bin/false >> /etc/passwd
    5. Generate the authentication keys:
      ssh-keygen -t dsa -b 1024 -f /etc/ssh/ssh_host_dsa_key -N ''
      ssh-keygen -t rsa -b 1024 -f /etc/ssh/ssh_host_rsa_key -N ''
    6. Create the required directories:
      mkdir /var
      mkdir /var/chroot
      mkdir /var/chroot/sshd
      chmod 700 /var/chroot/sshd

You should now be able to access the target with an SSH client and via SFTP.

Contributing author: