Difference between revisions of "Synology Nas"

From rbachwiki
Jump to navigation Jump to search
(Created page with "==How do I sign in to DSM with RSA key pairs via SSH?== '''Generate Key pair on local computer''' *Sign in to DSM as an administrator. *Go to DSM File Station > home. *Create an sub-folder named .ssh. *Upload the public key id_rsa.pub to the .ssh folder.")
 
Line 6: Line 6:
*Create an sub-folder named .ssh.
*Create an sub-folder named .ssh.
*Upload the public key id_rsa.pub to the .ssh folder.
*Upload the public key id_rsa.pub to the .ssh folder.
'''Sign in as an administrator'''
*Sign in to DSM as an administrator via SSH (refer to this article for detailed instructions, but do not run sudo -i).
*Run a cd command to switch to the .ssh folder you previously created.
*cd ~/.ssh
*Append the public key to a new file by running the command below. There will be two files in the .ssh folder: authorized_keys and id_rsa.pub.
*cat id_rsa.pub >> authorized_keys
*The setup is complete after the steps above. You can now sign in to your DSM via SSH using a specified administrator account without entering its password:2
*ssh DSM admin account@DSM IP address -p SSH port number
*ssh myadmin@10.17.28.75 -p 22

Revision as of 16:54, 6 February 2023

How do I sign in to DSM with RSA key pairs via SSH?

Generate Key pair on local computer

  • Sign in to DSM as an administrator.
  • Go to DSM File Station > home.
  • Create an sub-folder named .ssh.
  • Upload the public key id_rsa.pub to the .ssh folder.

Sign in as an administrator

  • Sign in to DSM as an administrator via SSH (refer to this article for detailed instructions, but do not run sudo -i).
  • Run a cd command to switch to the .ssh folder you previously created.
  • cd ~/.ssh
  • Append the public key to a new file by running the command below. There will be two files in the .ssh folder: authorized_keys and id_rsa.pub.
  • cat id_rsa.pub >> authorized_keys
  • The setup is complete after the steps above. You can now sign in to your DSM via SSH using a specified administrator account without entering its password:2
  • ssh DSM admin account@DSM IP address -p SSH port number
  • ssh myadmin@10.17.28.75 -p 22