Here is my situation.
I use Putty to make an SSH connection from Windows 10 to my Raspberry Pi2 (running latest Raspbian).
If I use just my standard Password to login, everything works fine.
If I use a Public/Private key-pair (with the Putty key generator and Pageant) I have a problem.
I store the public key (as one line) on raspberry in;
However I cannot login via Putty, I get a failed authentication.
If however, I move the
authorized_keys file (where the public key is stored) to:
/etc/ssh/Username/authorized_keys and I edit my
sshd_config file to retrieve the key from there - everything works fine!
So, as I see it, I have some sort of permission problem in the folder
~/.ssh, which causes the
authorized_keys file to be unavailable.
I have 2 questions;
Is it safe if I leave my public key
If it is not safe, what should I do?
Here is what I get when I use
ls -la on my folder
total 12 drwx------ 2 MyPi MyPi 4096 Dec 21 16:40 . drwxr-xr-x 29 MyPi MyPi 4096 Dec 21 17:25 .. -rw------- 1 MyPi MyPi 398 Dec 21 16:54 authorized_keys