Skip to content


Configure QNX 6.4.1 sshd

Due to a course about real time operating systems I was to install a QNX 6.4.1 on my computer. Having it installed under VMWare Player i wanted to have a possibility to connect to QNX via WinSCP to transfer files easily. That wasn’t that easy, it took me some time, but there’s a solution how to run sshd server under QNX 6.4.1 RTOS:

You have to run sshd with full path, otherwise you’ll get “sshd re-exec requires execution with an obsolete path” error message. So:

/usr/sbin/sshd

But then we get such an output:

Could not load host key: /etc/ssh/ssh_host_key
Could not load host key: /etc/ssh/ssh_host_rsa_key
Could not load host key: /etc/ssh/ssh_host_dsa_key
Disabling protocol version 2. Could not load host key
sshd: no hostkeys available -- exiting.

We need to generate those files. What is very important – while generating – you must provide NO passwords, otherwise sshd will not be able to read those files. Random numbers generator should be also fired, so:

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

We should be able to launch sshd server. Hooray!

But wait, it’s impossible to connect via ssh with user root under this OS! We have to add a new user. Under QNX there’s different command for this, comparing to the other *nixes. Type the following, where user_name is your new user name:

passwd user_name

After that answer for a few questions. Lastly you have to update /etc/group file. A little help for understanding groups is here: http://www.qnx.com/developers/docs/qnx_4.25_docs/qnx4/user_guide/accounts.html . You can edit this file by:

vi /etc/group

Add your recently created username to adequate groups, my group file look like that:

root:x:0:root
bin:x:1:root,bin,profetes
daemon:x:2:daemon,profetes
sys:x:3:root,bin,adm,profetes
adm:x:4:root,adm,daemon,profetes
tty:x:5:root,profetes
sshd:x:6:root,profetes
mail:x:40:mail
news:x:50:news
uucp:x:60:uucp
ftp:x:80:ftp,profetes
guest:x:90:
nobody:x:99:

After that you should be able to connect to your QNX via ssh! Congratualtions!

To have sshd launched everytime QNX boots up you have to add it to launching scripts. Without it you’ll have to fire /ust/sbin/sshd every time you power on your machine.

Any feedback is appreciated :)

Posted in general.

Tagged with , .


7 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. IgoS says

    Napisz posta o tym programie do mp3 :)

  2. Özgür says

    Thank you very much.
    Greetings from Türkiye.

  3. profetes says

    you’re welcome :)

  4. Marco Castro says

    An extra step was needed. The directory /var/chroot/sshd must exist and it has to be owned by root without write permissions for group and others

    mkdir -p /var/chroot/sshd
    chmod 700 /var/chroot/sshd

    After that, everything worked fine!

  5. Saket says

    If some whats to connect as root then it can be done by updating file /etc/sshd_config
    put ‘PermitRootLogin yes’ in /etc/sshd_config and it will allow to connect as root.

    • profetes says

      It’s good to know, thanks!

    • digdug says

      On my QNX VM the file is /etc/ssh/sshd_config. I also had to add ‘PermitEmptyPasswords yes’.



Some HTML is OK

or, reply to this post via trackback.



SEO Powered by Platinum SEO from Techblissonline