September 23, 2023

[Solved] Permission denied (publickey,password) with correct password

First I simply checked that I was able to log in via the console interface on the website of the VPS provided. I was.

On the web, I found some discussions about updating PermitRootLogin to Yes from the default prohibit-password (without forgetting to reload the configuration afterwards.) I did so after checking the manpage and a document on the official website of OpenSSH1. Still, permission denied.

I also tried printing verbose i.e. running $ ssh-copy-id -vvv root@redacted_ip_address. There seemed to be nothing wrong on that end.

Then I found a message of someone suggesting to check auth.log (located in /var/log) to see what can be learnt from the server side. I looked. All I saw was Failed password for root from redacted_ip_address port redacted_port ssh2.
But my password was correct.

I had read on another blog post about some issue in decrypting passwords or so. I was using a passphrase, with spaces. I updated to a password, without space. That solved my issue. I don’t know if spaces were the issue though.

See Also:


  1. https://www.openssh.com/txt/release-7.0↩︎


personal computing command-line interface (cli) gnu linux trisquel shell literacy office applications wiki ssh hosting

No affiliate links, no analytics, no tracking, no cookies. This work © 2016-2024 by yctct is licensed under CC BY-ND 4.0 .   about me   contact me   all entries & tags   FAQ   GPG public key

GPG fingerprint: 2E0F FB60 7FEF 11D0 FB45 4DDC E979 E52A 7036 7A88