How can I safely upgrade OpenSSH on old remote Linux PCs (Centos 6 and 7)?

How can I safely upgrade OpenSSH on a remote Linux PC?

Is filtering telnet temporarily sufficient? Or maybe I could run a script that would not restart sshd until a reboot – and save telnet for a backup access method.

I just tested and restarting sshd did not break my SSH connection. So telnet would only be used if the script breaks sshd.

I need to upgrade Centos 6 and 7 PCs that can no longer use yum. I have tested compiling and installing in a VM and started writing a script. These PCs are remote with no admins on site so I might need to enable telnet in case my script breaks SSH. I know that is very very unlikely. lol

The script will make backups that I could restore if necessary.

Read more here: Source link