Permission denied (publickey)
So I've had SSH working for a few weeks no problem. I have a friend that logged in a few times and we even got rsync going between our two servers. but suddenly all of the synology accounts stopped working, they all say 'Permission denied (publickey)' when we try to ssh in. But I can still login through the DSM. So I'm sort of at a loss, ssh is enabled in the terminal and SNMP, and I can't even login as an administrator. Does anyone have any ideas?
While we are at it. I have a constant 100% volume usage and about 20% disk, I'm currently trying to defragment the disks but I have pretty low hopes on that front.
for reference I have a DS918+
Posted Apr 17, 2019, 1:47 AM UTC
12
Were you using public key or password login before?
My guess would be either an update had broken something in /etc/ssd/sshd_config, or something changed permissions on user directories, specifically ~/.ssh - if you are using public key. ~/.ssh needs to be readble only by the user it belongs to.
If you were using password authentication before I suspect an update has disabled it by setting PasswordAuthentication no in /etc/ssh/sshd_config.
You can run commands from DSM using run now in scheduled tasks, so you could run a task like:
/bin/grep PasswordAuthentication /etc/ssh/sshd_config
or just:
/bin/cat /etc/ssh/sshd_config
You can then view the output of the command as you would any other scheduled job. To see what is going on.
I was using a password. my friend was using a public key
that's a great tip, I will give that a shot when I get the chance and report back. thanks!