1-25-2019

Installing an old version of SSH on my server

The reason for this is that scp2dos used to work. And it used to work just fine, both ways. It does not work now, because I keep my linux server up to date and the latest version of openssh (sshd) does not support whatever key exchange protocol scp2dos wants to use. Or something like that.

Well, it used to work, so why not dig up the old version of sshd that did work and run it on my server? I don't expose my server to the outside world (if I did, I would run the old version on an alternate port and put some fussy firewall rules in place).

RPM dependency hell

Finding old RPM's is not that hard, but there are tricky dependency issues. I am running Fedora. The openssh-server RPM depends on an old openssh RPM. However I do want to run an ssh client, and that depends on the current openssh RPM. I don't want to run the current openssh-server, so as long as the old server can work with the current openssh, it might work to just force the install.

For no particular reason, I chose 5.9 which went with Fedora 17 (I am currently running 7.6 with Fedora 27). The package contents were:

rpm -qlp openssh-server-5.9p1-30.fc17.x86_64.rpm
/etc/pam.d/sshd
/etc/ssh/sshd_config
/etc/sysconfig/sshd
/usr/lib/systemd/system/sshd.service
/usr/lib64/fipscheck/sshd.hmac
/usr/libexec/openssh/sftp-server
/usr/sbin/sshd
/usr/sbin/sshd-keygen
/usr/share/man/man5/moduli.5.gz
/usr/share/man/man5/sshd_config.5.gz
/usr/share/man/man8/sftp-server.8.gz
/usr/share/man/man8/sshd.8.gz
/var/empty/sshd
I install it like so:
rpm --nodeps -ivh openssh-server-5.9p1-30.fc17.x86_64.rpm
warning: openssh-server-5.9p1-30.fc17.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 1aca3465: NOKEY
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:openssh-server-5.9p1-30.fc17     ################################# [100%]
Running as unit: run-r9eaa361323144ef8b414ca8579742b77.service
I start it via "service sshd start". I use "telnet localhost 22" to ensure that it is running. I also need to either open port 22 on my firewall or do "service iptables stop".

No luck with either 5.9 or 5.3 -- and I have no record of what ssh it used to work with. A tip for sshd debugging is:

service sshd stop
/sbin/sshd -D -dd
This runs the ssh server in a terminal window. The -D switch tells it not to detach itself and go into the background. The -dd switches turn on various amounts of debug output.
Have any comments? Questions? Drop me a line!

Adventures in Computing / tom@mmto.org