Quantcast
Channel: A Portal to a Portal
Viewing all articles
Browse latest Browse all 1850

Synology NAS - From My Mac, Via SSH

$
0
0
I'm definitely NOT new to this party, but I was remarkably impressed with how easy it was to setup SSH between my Mac and my Synology NAS, avoiding the need for me to use my password each and every time I log in.

I followed this: -


and this: -


This is what I did on the Mac: -

ssh-keygen -t rsa

to generate a public/private key pair.

I then used this: -

pbcopy < ~/.ssh/id_rsa.pub

to copy the public key to the clipboard.

On the NAS, I did this: -

vi /etc/ssh/sshd_config 

amending it to read: -

PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys

and then this: -

touch .ssh/authorized_keys
chmod 700 .ssh/
chmod 644 .ssh/authorized_keys 


and then this: -

vi .ssh/authorized_keys 

to add the previously copied Mac public key.

I was then able to access the NAS without a password: -

ssh root@nas

and verified access: -

uname -a

Linux DiskStation 3.2.40 #8451 SMP Wed Aug 17 05:11:00 CST 2016 armv7l GNU/Linux synology_armadaxp_ds414

The first time out of the gate, I was prompted for the passphrase for the Mac public key, but that's as expected.



Viewing all articles
Browse latest Browse all 1850

Trending Articles