For about half a year now I own a Synology DiskStation DS412+, which is a wonderful 4-bay NAS. I fitted it with 4 3TB Seagate drives for a grand total of 12 TB of storage. Later I will document how I store my data and especially what and how I backup.
Now I want to note the steps I have to take after updating the DSM software of the box to get things back to normal. Because the same two things always break:
- Lost access to ipkg packages
- Password authentication gets re-enabled for SSH access
MissileHugger is the most appreciated source of the next instructions, but since I am terrible with vi, I augmented them a bit. And the worst about ipkg not working is that nano is not available 🙁
$ vi /root/.profile
Press “i” in vi to start editing
Add /opt/bin:/opt/sbin: at the start of PATH
Press ESC to stop editing.
Type “:x” to save the file and exit vi.
$ /etc/rc.local $ . .profile
Nano should work now, if not reboot
Disable password authentication in SSH
The second side effect of a DSM upgrade is the re-enabling of password authentication in the SSH server. Like my VPS I have configured SSH to only allow access using public key authentication. For that I specifically disabled password authentication, but alas, that gets enabled again.
But now that nano works again (yay!) let’s use it:
#PasswordAuthentication yes to
Restart the DiskStation. All should be fine again … until the next DSM upgrade.
To test if password authentication works I keep a special configuration in PuTTY to connect to the DiskStation without a private key. I use that to check after an upgrade.
- MissileHugger gave the instructions to fix ipkg at http://missilehugger.com/328/dsm-4-0-ipkg-fix/
- My extremely limited vi knowledge comes from http://www.cs.colostate.edu/helpdocs/vi.html
- Scott Granneman wrote a series of posts on using SSH to connect to a Synology Diskstation at http://www.chainsawonatireswing.com/2012/01/15/ssh-into-your-synology-diskstation-with-ssh-keys/