Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 ?

share|improve this question
Your update should be a separate question. – Iain Sep 12 '11 at 7:33
up vote 6 down vote accepted

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.

share|improve this answer
Thanks for reply, i will try via yum. – taras Sep 12 '11 at 3:04
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
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 posting your answer, you agree to the privacy policy and terms of service.

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