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

Title says it all.

I'm going to upgrade ssh on a unfamiliar server. What would it be a good idea to backup before doing so?

share|improve this question

Along with normal backups I would recommend performing the upgrade within a screen it tmux window, as if there is a crash within the window you can easily open up a new shell without having to create a new shell session. I also know during a big remote update ubuntu opens a second ssh instance on a different port, to allow reconnection. A remote control system such as KVM (what HP calls iLO, Dell calls DRAC) is probably the best solution overall, as if there are any problems you can get console access, remotely mount media, perform power cycles etc. In terms of backups I don't think there is anything other than the usual (ie configuration and data files)

share|improve this answer

The configuration files and the files referenced in the configuration files.

share|improve this answer
got those. just want to make sure I dont skip something not immediately obvious (to me). Thanks! – karmet May 18 '12 at 20:45
Propably you should backup the servers private and public keys, too - but I did not run across any ssh that touched these during an upgrade. – Nils May 18 '12 at 20:55

Whatever changed since your last backup?

I don't see a reason that upgrading ssh should be different than any other routine backup. You should be backing up anything that changes on the server as a matter of routine anyway.

Make sure you have an ssh window open before the upgrade starts, don't close it until you know ssh is working again, so you can use your existing ssh session to fix things in the unlikely event that the upgrade fails and leaves ssh non-functional.

share|improve this answer
I wouldnt know whats changed since the last back up. But thanks for the confirm that there's nothing extra that might be affected. – karmet May 18 '12 at 20:47
so your backup software does know what changed since the last backup? – stew May 19 '12 at 0:51

Backup user .ssh folder so that their customizations are preserved. Just before upgrading place a cron job that reverts back to the old version of ssh after one hour or any suitably long time after the upgrade gets over, so that if upgrade is screwed and you lost connection to server, you regain back the server in that time you specified in cron job. And if everything went file, remember to erase the cron job.

share|improve this answer
I think kswift is saying he wants to upgrade ssh (I assume openssh-server) so I think restoring the users .ssh file wouldn't have any effect on this, and may further complicate matters – Rqomey May 25 '12 at 10:53
roomey, .ssh is not a file, it is a folder in user home directory. It might contain (depending on the user) config file among other files, which is used to configure that user specific config settings. This wont complicate anything. – Naai Sekar May 28 '12 at 6:01
yup sorry was a typo. I thought the .ssh folder in the users directory was to configure the client only, not the server, my apologies if thats an incorrect assumption, I just haven't seen an ssh server configured in that manner before. – Rqomey May 28 '12 at 20:38
yup, .ssh folder configures only the client. My mistake. – Naai Sekar Jun 13 '12 at 20:30

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.