Installing SFTP on an MPE System

SFTP is a component of SSH. OpenSSH is built upon several other pieces of software that also must be installed including Perl and OpenSSL. This document is intended to augment the documentation accompanying each of these pieces of software. Thanks to Ken Hirsch (kenhirsch@ftml.net) for porting OpenSSH to MPE. Ken has kindly shared his efforts and made the software available to anyone. At this moment only the SFTP module is functional on MPE while secure shell is not.

Step 1: Obtain required software:

Obtain and install the following components. Contact Beechglen for a package containing the GNU c compiler, openssl, openssh, and perl.

GNU C compiler
OPENSSL
OPENSSH
PERL

Download and install perl modules DIGEST and DIGEST::SHA1:

http://search.cpan.org/search?query=digest%3A%3ASHA1&mode=module

After downloading to your workstation, here is what you should expect to have.

C:DownloadOPENSSH-SFTP>dir
Volume in drive C has no label.
Volume Serial Number is 2031-94E8

Directory of C:DownloadOPENSSH-SFTP

09/22/2004  12:13 PM             6,260 Digest-1.07.tar.gz
09/22/2004  12:11 PM            38,698 Digest-SHA1-2.10.tar.gz
09/22/2004  03:55 PM        37,690,548 gcc-3.2.bin
09/20/2004  01:56 PM        13,925,651 openssh.mpe-full.tar.gz
09/20/2004  02:37 PM         6,905,362 openssl-0.9.6a-mpe.tar.Z
09/27/2004  10:39 AM        19,674,624 perl-5.6.1-mpe.tar.Z
                 6 File(s)     81,598,138 bytes
                 2 Dir(s)  50,071,871,488 bytes free

Step 2: Upload files to your HP3000 into the /tmp directory

Upload all of the files you have obtained as bytestream files. To specify bytestream using Windows FTP client, use ‘type tenex’ instead of ‘ascii’ or binary’. Also, some files are larger than the default file size of 2,000,000 FTP uses for bytestream files. Be sure to specify a ;DISC=xxxxxx where ‘xxxxxx’ is larger than the number of bytes in the file. Follow this example. Note that there is no space between the file name and the “;disc=” parameter.

ftp> type tenex
ftp> put perl.tar.Z /tmp/perl.tar.Z;disc=60000000

Step 3: Check other miscellaneous system requirements

Before proceeding, confirm there is an active UDC for the “SH” command to enter the posix shell correctly. You can properly enable the SH udc with

:setcatalog HPPXUDC.PUB.SYS;SYSTEM;APPEND

For SFTP to work properly your HP3000 must be pointing at a valid DNS server in RESLVCNF.NET.SYS. Try to PING another server by name.

:nettool.net.sys “ping;ping www.beechglen.com”

Correct routing and DNS issues before continuing.

Step 4: Install each component according to its specific documentation

Install GCC

:sh
shell/iX> cd /tmp
shell/iX> mv gcc-3.2.bin GNU.Z
shell/iX> compress -d GNU.Z
shell/iX> frombyte -b GNU GNU1
shell/iX> exit
:file GNU1=/tmp/GNU1;dev=disc
:restore *GNU1;/;tree;create;show
:sh
shell/iX> /usr/local/INSTALL.hp3000

Install PERL

:sh
shell/iX> cd /tmp
shell/iX> tar -xvofpz perl-5.6.1-mpe.tar.Z INSTALL
x INSTALL, 5460 bytes, 11 tape blocks
shell/iX> mv perl-5.6.1-mpe.tar.Z perl.tar.Z
shell/iX> ./INSTALL
shell/iX> ln -s /PERL/PUB/PERL /usr/local/bin/perl

Install PERL modules

:hello manager.sys
:sh
shell/iX> cd /tmp
shell/iX> gunzip Digest-1.07.tar.gz
shell/iX> gunzip Digest-SHA1-2.10.tar.gz
shell/iX> chmod 644 Digest*
shell/iX> touch /usr/include/sys/param.h
shell/iX> chmod 444 /usr/include/sys/param.h
shell/iX> exit
:listacct perl;pass
:hello mgr.perl
:sh
shell/iX> cd src
shell/iX> tar -xvofp /tmp/Digest-SHA1-2.10.tar
shell/iX> tar -xvofp /tmp/Digest-1.07.tar
shell/iX> cd Digest-1.07
shell/iX> perl Makefile.PL (You can safely ignore the warning "prerequisite MIME::Base64 failed to load")
shell/iX> make
shell/iX> make test (this command will probably only succeed 33%, this is OK)
shell/iX> make install
shell/iX> cd ..
shell/iX> cd Digest-SHA1-2.10
shell/iX> perl Makefile.PL
shell/iX> make
shell/iX> make test
shell/iX> make install

Install OPENSSL

:hello manager.sys
:sh
shell/iX> cd /tmp
shell/iX> tar -xvfopz openssl-0.9.6a-mpe.tar.Z INSTALL
x INSTALL, 5792 bytes, 12 tape blocks
shell/iX> mv openssl-0.9.6a-mpe.tar.Z openssl.tar.Z
shell/iX> ./INSTALL

Install OPENSSH

:hello manager.sys
:sh
shell/iX> cd /tmp
shell/iX> gunzip openssh.mpe-full.tar.gz
shell/iX> tar -xvofp openssh.mpe-full.tar
shell/iX> cd openssh-3.7.1p2
shell/iX> cp myrand /tmp/myrand
shell/iX> cp EGDCTL /SYS/PUB/EGDCTL << copy somewhere on HPPATH >>
shell/iX> callci ./EGDCTL start << streams EGDJOB >>
#J19

The EGDJOB must be running at all times for SFTP to function. This is not just an installation step.


shell/iX> umask 022
shell/iX> make install

The final command /usr/local/sbin/sshd from the make install which WILL ABORT with a “Data Memory Protection Trap” Not to worry, this piece isn’t required for SFTP to function properly.

Step 5: Test connection to an SFTP server

shell/iX> sftp doug@server1.beechglen.com
Connecting to server1.beechglen.com...
The authenticity of host 'server1.beechglen.com (192.168.100.201)' can't be established.
RSA key fingerprint is d1:b4:36:d3:28:e2:91:30:cb:c7:a4:9f:06:5e:bb:5f
.
Are you sure you want to continue connecting (yes/no)?
y
e
s

Warning: Permanently added 'server1.beechglen.com,192.168.100.201' (RSA) to the list of known hosts.
doug@server1.beechglen.com's password:

SFTP is now ready to go. Don’t forget to run the command “EGDCTL start” after each reboot to start up the EGDJOB.