[SOLVED] Some help with a new version of SSH under RHEL 4
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
After reading about the Controlmaster features of OpenSSH 4, <http://www.debian-administration.org/articles/290>
<http://www.cyberciti.biz/tips/howto-improve-ssh-session-performance-by-reusing-an-existing-connection-to-a-remote-openssh-server.html>
I decided I want to try it out. But I see RHEL 4 only has OpenSSH 3.9 installed.
So I d/l'd and installed the latest OpenSSH in a /test directory so I'll have all my distro-supplied stuff to revert to just in case.
How do I tell my system to use the ssh server binaries in /test instead of the default one?
the following will mess up your RedHat installed start/stop script. So RedHat will probably complain the next time you try to do an update -- it'll see you have the RH sshd package, but your start/stop script will be altered... you need to understand what you're doing when you try the following:
look at the /etc/init.d/sshd shell script. On RHEL, this is the "controller" script used by init to start/stop ssh. There are several variables set at the top. I would create a *new* directory -- don't use /etc/sshd, the standard RHEL config location -- to hold the config of your freshly installed sshd. Maybe /etc/sshd_v1.4 or something...
stop the sshd (as root '# /etc/init.d/sshd stop') before you edit the script. DANGER: if you are connecting to the system remotely, keep an extra login screen off to the side. If you stop sshd and log out, you will need to go to the console. Refer to chkconfig(1) for info on how sshd is auto start/stopped at boot/shutdown.
Then adjust your init.d/sshd shell script. Change the KEYGEN and SSHD variables to point to the new ones you installed. Update all the instances of /etc/sshd/ to reflect the new config dir containing your configs for your new installation. (I would start by copying the entire /etc/sshd/ directory if your new install didn't make you a new config dir somewhere.)
after adjusting, start it up: '/etc/init.d/sshd start'
I waited a bit to see if anyone else might chime in. Then it occured to me to rename /usr/sbin/sshd as /usr/sbin/sshd.old and then hard link my /test/sbin/sshd from its install dir to be /usr/sbin/sshd. A "service sshd restart" and I was up and running with the new sshd (I can tell it's the new one because when I log in I'm notified that my server's rsa key has changed). Seems simpler.
GOOD ADVICE about keeping an extra login off to the side. I didn't need it, but that's always good advice if messing remotely with sshd. And just in case, I didn't do this from home, so if worst came to worst, I could walk over to the server room.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.