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.

2 comments:

  1. Thank you that worked for me...
    ... but it does not seem to survive a NAS restart (QTS 4.2.0).
    I was originally running both OpenSSH and the core SSH on two different ports. This stopped working after the firmware upgrade. Only the core version is running, and my preferred SSH client is not able to access the system, but Terminal works (which is why I introduced OpenSSH originally).
    What is necessary for this to survive a reboot?

    ReplyDelete
  2. Obviously, the collection of a writer must be a bundle of creativity. New ideas of writing become the reason of success. It makes your work worthwhile. Everyone wants to praise your writing because they bound by creativity.QNAP TS X53U Series

    ReplyDelete