UPDATED – UPDATED – UPDATED
PLEASE READ THE STEP BY STEP GUIDE (THE UPDATE)
Simple step by step guide to getting Root Access on a Synology DiskStation
I’ve read this article, and decided to save the text – just to be sure.
http://www.mauchle.name/blog/?p=239
What I did was this:
Getting root access to the Synology after the DSM 6.0 update is solved by doing this.
If you get the WinScp, then you alse get the PuTTY and PuTTYgen.
I’ve used the Config File Editor as explained.
Afterwards I logged into WinScp and used the private key under Advanced–SSH—Authentication.
You’ve of course chosen a very difficult admin/root password for your Synology diskstation – but now everytime you want to connect with Putty you need to type in that long chain of characters, numbers and symbols.
Why not use a a keypair?
-
- Download PuTTY and PuTTYgen (or just get the installer, everything is in there) from here.
- Generate a keypair with PuTTYgen (Parameters: SSH-2 RSA)
- Save the private key as “myprivatekey.ppk”
- Copy the public key to the clipboard. Looks somewhat like this:
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAzP4MR3lkCD2pa7nwT3NMjjDBMmEuJ4exW4GKBBP+okArZ/IrjbLIpdh8ahpfgjh8kM//OVUGeRa1GigzcCuGzIa2YfS7L4Q9cbUUWFwIu2hGV3ZpJ2xDZExaaLH90Vw+ZBaozD2OI4FZ1Dqh8Bj29SQqIIbmxf/ASyTmXHZCbQk= rsa-key-20130414 - Connect to your diskstation with PuTTY
diskstation:22 - Login as root
- Edit the SSH config with
vi /etc/ssh/sshd_config - Look for the following lines
#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile .ssh/authorized_keys - Change them to this (by hitting “x” when the cursor is over the # and hitting ESC, then typing :wq ENTER)
#RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys - Go to /root and create the .ssh folder
cd /root
mkdir .ssh - Edit the keyfile
vi /root/.ssh/authorized_keys - Press “i”
- Paste your public key (by right clickking on your mouse) and save the file (Hit Esc, type :wq, hit Enter)
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAzP4MR3lkCD2pa7nwT3NMjjDBMmEuJ4exW4GKBBP+okArZ/IrjbLIpdh8ahpfgjh8kM//OVUGeRa1GigzcCuGzIa2YfS7L4Q9cbUUWFwIu2hGV3ZpJ2xDZExaaLH90Vw+ZBaozD2OI4FZ1Dqh8Bj29SQqIIbmxf/ASyTmXHZCbQk= rsa-key-20130414 - Set the access-rights to the file
chmod 700 /root/.ssh
chmod 644 /root/.ssh/authorized_keys - Disconnect with
exit - Open Putty again and make the following settings
Hostname: or
Port: 22
Connection type: SSH
Connection->Data->Auto-login username: root
Connection->SSH->Auth->Private Key: Your Keyfile
And save the session as <sessionname> - Create a new shortcut on your desktop with the following target
"C:\Program Files (x86)\PuTTY\putty.exe" -load "sessionname" - Finished. From now on you can connect by double-clicking.
Written with information from Chainsaw on a Tire Swing
2 kommentarer til “Synology DSM 6.0 Root Access”
works like a charm. Thx a lot!
Hi Bernie. Glad I could help.