Ssh – How do to upgrade OpenSSH remotely via ssh command line

fedorassh

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 ?

Best Answer

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.