I need to upgrade OpenSSH in my fedora server remotely using ssh access. Is it safe doing it via ssh remotely ? Any recommended and safe method to do this upgrade remotely ?

Update: After i upgraded it to the latest version: OpenSSH_5.9p1, OpenSSL 0.9.8b i tried to change the ssh_config, tried to set chroot access. But it gives the error specific to the old version: OpenSSH_4.5p1. When i tried to reconnect from putty i connected to OpenSSH server OpenSSH_4.5p1. Then #ssh -v shows new updated version OpenSSH_5.9p. Looks like there is 2 version of SSH is running now. Any suggestion ?


Are you using the rpm package and updating via yum? You can safely update openSSH remotely. When you're done, do an /etc/init.d/sshd restart to restart the service. Your ssh connection will stall for a moment while it's restarting, but in my experience, it doesn't drop. It somehow reattached to the connection after the restart.

  • 7
    Actually, active ssh connections will not be affected at all, not even a momentary stall. They're still using the old binaries/libraries/etc. They'll continue functioning normally until the SSH session is closed. Any new connections will be serviced using the newly-installed package. – EEAA Sep 12 '11 at 3:16
  • 1
    This answer is mostly correct. I've never seen it stall, and any such stall must be unrelated to the upgrade. The open connections will keep using the old OpenSSH until they are finished. The old executable binary is kept in memory by those processes, and any open files that get replaced during upgrade will still be available through their file descriptors to the old processes until they are closed. So it it safe to upgrade OpenSSH through ssh itself. – joechip Sep 12 '11 at 3:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.