Saturday 18 May 2013

Updating QNAP firmware and using openssh

Just a quickie...

If you are one of the people who wants a more configurable ssh connection to your QNAP NAS box and have configured the use of openssh like from one of my previous blog posts and you notice that after a firmware upgrade of the qnap NAS the ssh doesn't seem to allow connections any more. This is usually with a "Connection Reset by Peer" error.

In this case it means that the openssh sshd has been overwritten by the firmware upgrade.

Dont Panic! Its an easy fix, you just need to re-copy the openssh sshd back over the default one on the NAS and restart your sshd either in the terminal connection to the NAS box or through the web administration tool.

So looking at James Lick's post again, its just the following 2 lines after connecting to your NAS box via telnet (well that is what I use at least):

  • mv /usr/sbin/sshd /usr/sbin/sshd-orig
  • cp /opt/sbin/sshd /usr/sbin
Now a quick restart of your sshd, this can be found in the web admin tool, 
  • Network Services, 
  • Telnet/SSH,
  • Click Allow SSH connection to disable it then apply
  • When its disabled, re select it to enable it and then press apply.

That should get your ssh back up and running.