OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Applications => Topic started by: j on October 22, 2020, 01:56:42 am

Title: openssh-server on ArcaOS
Post by: j on October 22, 2020, 01:56:42 am
I've installed openssh-server on ArcaOS 5.0.2 (yum install openssh-server) but it doesn't appear that the port 22 is open, does anyone has further instructions on how to configure openssh-server, I've looked through other threads, but didn't find this info.

Note I also have openssh-client installed.
Title: Re: openssh-server on ArcaOS
Post by: Dave Yeo on October 22, 2020, 05:13:34 am
I don't know much about setting up an openssh server but you might want to look at some of the packages at https://hobbes.nmsu.edu/?path=%2Fpub%2Fos2%2Fapps%2Finternet%2Ftelnet (https://hobbes.nmsu.edu/?path=%2Fpub%2Fos2%2Fapps%2Finternet%2Ftelnet), the Warpin installer one is likely the most complete one. Hopefully it comes with better documentation.
I'll also add that our current libc doesn't have the best terminal handling as it is missing some functions, yet most stuff installed with YUM will use it. The older EMX libc is much better for handling terminals, though on the other hand, the stuff built against it are likely to be old and have security problems if you are doing anything worth worrying about.
Title: Re: openssh-server on ArcaOS
Post by: Rich Walsh on October 22, 2020, 05:48:53 am
I've installed openssh-server on ArcaOS 5.0.2 (yum install openssh-server) but it doesn't appear that the port 22 is open,

OS/2 doesn't have a firewall installed by default, so nothing is blocking port 22.

How are you testing? Using localhost for both client and server, or from one machine to another? If the latter, have you configured your router appropriately?  IOW, unblocked the port in the router's f/w _and_ set up port forwarding for port 22?
Title: Re: openssh-server on ArcaOS
Post by: j on October 22, 2020, 02:50:28 pm
I'm testing using the client, trying to ssh to localhost.
I've also tried the WarpIn packages prior to posting this thread, with the same outcome.
Obviously I must be doing something wrong.
Title: Re: openssh-server on ArcaOS
Post by: j on October 22, 2020, 05:37:20 pm
"ssh localhost 22" shows:
ssh: connect to host locahost port 22: Connection refused

"c:\usr\sbin\sshd.exe" shows:
sshd re-exec requires execution with an absolute path

For reference, telnetd works fine
Title: Re: openssh-server on ArcaOS
Post by: Roderick Klein on October 23, 2020, 12:35:39 am
"ssh localhost 22" shows:
ssh: connect to host locahost port 22: Connection refused

"c:\usr\sbin\sshd.exe" shows:
sshd re-exec requires execution with an absolute path

For reference, telnetd works fine

Telnetd that that works is a whole different thing. SSH is much more complicated since it required encryption keys.
Did you try the SSH stuff from Alex Taylor:
http://www.altsan.org/os2/utils/

Did you start SSH or also consult the documentation how to set it up ?

Roderick Klein

Title: Re: openssh-server on ArcaOS
Post by: j on October 24, 2020, 05:50:31 am
I think I got it to work with Alex's package, after installing the 4 WarpIN packages, I had to mkdir c:\etc\ssh and copy /etc/ssh/*.* c:\etc\ssh\ then it worked.
sshd needs to be run in a shell, there's probably a better way.
I haven't found out where the root/root and test/test credentials are stored though.
Title: Re: openssh-server on ArcaOS
Post by: Dave Yeo on October 24, 2020, 06:24:58 am
You can try detaching sshd, detach sshd.exe or such. It won't need a console window.
Is there not pwd.db etc files in c:\etc ?
Title: Re: openssh-server on ArcaOS
Post by: j on October 24, 2020, 07:51:58 am
Thank you for the detach command.
No, I do not see a pwd.db in c:\etc or /etc
Title: Re: openssh-server on ArcaOS
Post by: Dave Yeo on October 24, 2020, 08:33:27 am
What about %ETC%? Probably set to C:\MPTN\ETC and is the usual system etc where hosts, resolv and such live, rather then the ports etc.
If you're happy with the detach command, you can put it in startup.cmd, might need creating in the root of your boot drive. gets run at the end of boot and is usually a regular batch file though REXX also works I understand.