Skip to content

Instantly share code, notes, and snippets.

@altmind
Last active August 24, 2026 18:07
Show Gist options
  • Select an option

  • Save altmind/29a4859a4e118a85eb97417ba0dedffa to your computer and use it in GitHub Desktop.

Select an option

Save altmind/29a4859a4e118a85eb97417ba0dedffa to your computer and use it in GitHub Desktop.
os2-sshd.tx
Install WarpIN, then ANPM.
On plain Warp, install kLIBC Pathrewriters first:
klibccfg_1_0_2_1.exe
Let ANPM bootstrap RPM/YUM. We used:
SET UNIXROOT=C:
and kLIBC configured:
SET LIBC_HOOK_DLLS=C:\OS2\DLL\klibccfg.dll@_kLIBCInitPath!pathrewrite
Install SSH and user management:
yum install openssh openssh-server klusrmgr
We ended up with:
openssh-7.7p1
openssh-server-7.7p1
Create the SSH user with klusrmgr, e.g.:
user
HOME=/home/user
SHELL=/usr/bin/sh.exe
Generate server keys:
ssh-keygen -A
In C:\etc\ssh\sshd_config, we needed:
PermitUserEnvironment yes
StrictModes no
Subsystem sftp /@unixroot/usr/libexec/openssh/sftp-server.exe
StrictModes no is necessary because OS/2 filesystem ownership/modes don't satisfy normal OpenSSH Unix checks.
Create:
C:\home\user\.ssh\environment
containing:
UNIXROOT=C:
HOME=/home/user
PATH=/usr/local/bin;/bin;/usr/bin
Important: OS/2 kLIBC uses ; as the PATH separator, not :.
Put the public key in:
C:\home\user\.ssh\authorized_keys
Check configuration:
sshd -t
Start the daemon using the Unix-style executable path, because OpenSSH's re-exec rejects C:\...:
DETACH C:\usr\bin\sh.exe -c "/@unixroot/usr/sbin/sshd.exe -D"
For boot startup, put that same command near the end of:
C:\TCPIP\BIN\TCPSTART.CMD
Then Windows can simply use:
ssh user@192.168.88.202
One remaining limitation: PTY allocation currently fails (openpty: No such file or directory), so SSH command execution works, but a fully normal interactive terminal still needs the VioRoute/TNPIPE side investigated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment