Hello,
Ayant trouvé mon chemin pour me log en root, je vous donne la recette ;-)
Pour commencer, je n'ai rien inventé, j'ai trouvé mon inspiration ici : http://www.mauchle.name/blog/?p=239&cpage=1#comment-29143
Mes modifications sont en "jaune".
(1) Download PuTTY and PuTTYgen (or just get the installer, everything is in there).
(2) Generate a keypair with PuTTYgen (Parameters: SSH-2 RSA)
(3) Save the private key as “myprivatekey.ppk”
(4) Copy the public key to the clipboard. Looks somewhat like this :
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAzP4MR3lkCD2pa7nwT3NMjjDBMmEuJ4exW4GKBBP+okArZ/IrjbLIpdh8ahpfgjh8kM//OVUGeRa1GigzcCuGzIa2YfS7L4Q9cbUUWFwIu2hGV3ZpJ2xDZExaaLH90Vw+ZBaozD2OI4FZ1Dqh8Bj29SQqIIbmxf/ASyTmXHZCbQk= rsa-key-20130414
(5) Connect to your diskstation with PuTTY
diskstation:22
(6) Login as root admin (obviously the root will not work on DSM 6 ... so use any administrator account like the original "admin")
(7) Elevate your admin user to "root" by typing (then all your command lines will have to be precidered by "sudo " to be executed as "root") :
sudo -l -U root
*** Steps 8 to 10 are probably optional based on CoolRaoul comments .... based on my experience, sudo remains needed otherwise you will not have the rights to open / change files ***
(8) Edit the SSH config with
sudo vi /etc/ssh/sshd_config
(9) Look for the following lines (using the keyboard arrows up & down) :
#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile .ssh/authorized_keys
(10) Change them to this (by hitting “x” when the cursor is over the # and hitting ESC, then typing :wq ENTER).
There is not visible effect after having hitted ESC ... do not search and type :wq ENTER
#RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
(11) Go to /root and create the .ssh folder
(the .ssh dir was already existing in my DSM ... try to go directly to 12.
IF the step 12 is not working ... then type
sudo -s
Then, type
cd /root
mkdir .ssh
Then, type
Exit
(12) Edit the keyfile
sudo vi /root/.ssh/authorized_keys
(13) Press “i”, paste your public key (right clic) and save the file (Hit Esc, type :wq, hit Enter)
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAzP4MR3lkCD2pa7nwT3NMjjDBMmEuJ4exW4GKBBP+okArZ/IrjbLIpdh8ahpfgjh8kM//OVUGeRa1GigzcCuGzIa2YfS7L4Q9cbUUWFwIu2hGV3ZpJ2xDZExaaLH90Vw+ZBaozD2OI4FZ1Dqh8Bj29SQqIIbmxf/ASyTmXHZCbQk= rsa-key-20130414
(14) Set the access-rights to the file
sudo chmod 700 /root/.ssh
sudo chmod 644 /root/.ssh/authorized_keys
(15) Disconnect with
exit
(16) Open Putty again and make the following settings
In session :
Hostname or IP
Port: 22
Connection type: SSH
In Connection
Data->Auto-login username: root
SSH->Auth->Private Key: Your Keyfile
In session, save the session as <sessionname>
(17) Open WinSCP
Add a new site
Select "SFTP"
Add the Hostname (or IP) and SSH port
Add as username "root"
In Advanced > SSH > Auth > Auth parameters : select the same SSH key file as in (16) and tic the option "allow the connection agent"
Save and log