Talk:SSH and ArcaOS
Martini (talk) 02:30, 3 October 2026 (UTC) Comments
[2/10/2026 4:54 p. m.] Dmitrii Kuminov in reply to Martin Iturbide: > Hello. I need a little help here.... It's a little bit tricky indeed. Any LIBC-based program (e.g. Samba or ssh) uses the LIBC user database which is managed by kLIBC/LIBCn. This database lives in /@unixroot/etc/*pwd.db. These files are binary DB files created from /@unixroot/etc/master.passwd.
Indeed, we used to have a VREXX program called klUsrMgr.exe to manage this user base, but it has a few rough edges and may not set things up properly, especially if you also have Samba installed (it was made for Samba in the first place IIRC). You may try to use this program to add/remove/manage users, but it's better to manually check /@unixroot/etc/master.passwd afterwards to make sure it contains the correct definition.
In a normal ArcaOS install, your default user is already there but it lacks the shell setup (shell defaults to /usr/sbin/nologin), so ssh won't let you log in. What you need to do is replace /usr/sbin/nologin with /@unixroot/usr/bin/sh.exe, either using klUsrMgr or by editing master.passwd directly.
In the latter case, it's important to always run /@unixroot/usr/bin/pwd_mkdb.exe to regenerate the DB files - without this step, LIBC won't see new definitions.
Also, each user needs a valid home directory. This can also be done with klUsrMgr, or manually in master.passwd, but it's important to check that the directory has : after the drive letter replaced with $. A normal user line in master.passwd should look like this:
dmik:*:100:513::0:0:Default User:D$/Users/dmik:/@unixroot/usr/bin/sh.exe
Next, about passwords. While you can use klUsrMgr (or /@unixroot/usr/bin/usermod.exe from command line) to set up a user password and then enable password logins in /@unixroot/etc/ssh/sshd_config, it's not recommended. It's much easier and safer to use SSH keys instead.
Just generate a SSH key pair using a normal Linux instruction and add the public key to $HOME/.ssh/authirized_keys on the OS/2 machine (see above about the valid user home directory). Also make sure that .ssh and all files in it have the 0600 Unix permissions, otherwise ssh will complain.
Once the public key is added on the OS/2 machine, you just use the private key part on your Linux machine with the ssh command using normal Linux instructions. The simplest way to do it is to put the OS/2 host definition, including the IP address and the private SSH key to use, to your $HOME/.ssh/config file on your Linux machine. That way, logging into the OS/2 machine will be as easy as ssh HOST. [2/10/2026 4:56 p. m.] Dmitrii Kuminov: At some point we will update klUsrMgr to do the right thing for you, but I'm not sure when it will happen...