Skip to content

Instantly share code, notes, and snippets.

@ivan-leschinsky
Created March 29, 2019 21:18
Show Gist options
  • Select an option

  • Save ivan-leschinsky/2e857c704595492f2647b3d730315f45 to your computer and use it in GitHub Desktop.

Select an option

Save ivan-leschinsky/2e857c704595492f2647b3d730315f45 to your computer and use it in GitHub Desktop.
How to add SSH access by pubkey for synology

How to SSH to synology without password (pubkey)

  1. After login to your user, enter root session:
sudo -i
  1. Edit SSHD config:
vi /etc/ssh/sshd_config

1.a. Uncomment these lines:

PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
  1. Restart sshd:
synoservicectl --restart sshd
  1. Enable homes dir in the users settings in teh Synology

  2. Make homes dir readable by sshd

chmod 755 /volume1/homes/USERNAME
  1. Login with ssh-copy-id for the first time or manually put your public key to the .ssh/authorized_keys in your home folder
@ivan-leschinsky
Copy link
Copy Markdown
Author

Useful links:
https://forum.synology.com/enu/viewtopic.php?t=126166
9. Configure the Synology’s SSH service to allow login by key (about troubleshooting with telnet)

https://blog.aaronlenoir.com/2018/05/06/ssh-into-synology-nas-with-ssh-key/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment