ssh for OS/2 v01                      Robert Muchsel (muchsel@acm.org) 01/13/96
----------------

!!!! Use InfoZIP unzip to unzip the files to an HPFS drive !!!!


   Contents
   ========

   1. About the ssh-os/2 port
   2. Installation
   3. What you need to recompile


1. About the ssh-os/2 port
--------------------------

The ssh port for OS/2 consists of a set of text mode applications (i.e.
not PM/WPS programs). The port was done using Eberhard Mattes' excellent
emx Libraries for OS/2 and is based on ssh-1.1.8/1.2.0.

Most of the source didn't have to be changed for OS/2, except for occasional
"#ifndef #endif"s. There were, however, two big problems:

 1) There is no VT100 emulator in OS/2
 2) The select()-loop in ssh didn't work.

Since there were no free VT100 emulators for OS/2, I've written one from
scratch. This emulator is fast enough (altough it uses the 16 Bit VIO calls)
and passes the vttest (OS/2 telnet does not, check it!) and other vt100
test suites. The code was also enhanced to support all extended Linux
escape codes and key codes. This enables you to log into a Linux box, set
term=console, and everything will work. The function keys return Linux
key codes, however SHIFT-F1 to SHIFT-F4 return the standard vt100 key codes.
(I'm not yet sure what to do with the code, so it is not in the public domain.)

To correct the second problem, I had to rearrange the loop in ssh.c. Altough
I didn't notice it, this change might result in a degradation of ssh
performance and "smoothness" of the display.

ssh has been tested locally (OS/2 -> Linux), via SL/IP and the SLiRP SL/IP
emulator. Note that slirp-0.9x does NOT work (ssh will hang after a few
seconds), while slirp-1.0a works perfectly.

Currently, only ssh and ssh-keygen are OK. sshd has a problem related to
exec()ing the shell (because there are no ptys), and scp does not work for
unknown reasons. I haven't tried the agent programs, because I don't have an
agent (to build the agents, you will also have to replace the absolute
/tmp paths with getenv("TEMP")...)

Changes had to be made to all of the files to replace the absolute paths
(/etc and home, etc.) with environment variables (ETC HOME TEMP).
Currently, the paths are not truncated (this makes it easier to move
files and keys from and to UNIX), requiring the HPFS file system. You can,
however, edit ssh.h and the Makefile, truncate everything and recompile.
Note that the .ssh subdirectory in home is illegal under FAT naming
conventions, too.

There are some ssh command line parameters which do not work under OS/2 or
which have not been tested (port forwarding, X, etc.).

I'm sorry this port still looks like a mess, but then I don't have the time
to clean it up.


2. Installation
---------------

For those of you who are no scared to use this software despite the problems
outlined above, do the following:


  0) Install Internet access and/or TCP/IP and verify that telnet works.

  1) Install the emx runtime DLLs (instructions are included with the
     DLLs).

  2) Check that your ETC directory (\MPTN\ETC under Warp Connect,
     \TCPIP\ETC under plain Warp) is on a HPFS drive.

  3) Add environment variables to CONFIG.SYS and create the corresponding
     directories:

     SET USER=xxxx               ) These might be defined already
     SET HOSTNAME=xxxxxx         )

     SET TERM=console
     SET SHELL=e:/bin/sh.exe
     SET TMP=e:/temp
     SET TMPDIR=e:/temp
     SET HOME=e:/home

     You can change the TERM setting to vt100 or vt102, however "console"
     is best if you want to log into a Linux machine. If you don't want to
     use the vt100 emulator, set TERM=ansi. Since the OS/2 ansi support is
     far from complete, results will not be perfect.

     Place the executable files somwhere in your path.

  3) Reboot

  4) Create your key(s), configuration files, etc. as indicated in the
     ssh manuals. For example,

       \home\.ssh\config
                  identity
                  identity.pub

  5) Cross ypur fingers:

       ssh host

     Use ssh -d to disable the VT100 emulator. The emulator should work
     regardless of the video mode (try 'mode 80,43').



3. What you need to recompile
-----------------------------

To be honest, I don't know if the following list is complete:

  emx+gcc, v 0.9a fix 06 or better
  gnu file utilities
  gnu pearl (?)
  a working make

Then, make.

If you intend to complete the sshd port: You might want to add a passwd file
to ETC. Replace fork() exec() with spawn() (this holds for other programs,
too). Rewrite the select() loop (like in ssh.c).

