Originally Posted by
goemonburo
But does anyone out there know what I need to do to fix a "Permission denied" error?
Alternatively, does anyone know how I can extend the ssh login time to something like...two hours? Either of those will easily answer my question.
I'll give it my best shot, I too ran into this about 8 months ago on 24.04 Devel.
I first checked in
The private key should have read and write permissions only for the user and no other permissions for the group and others. Mine did not.
My fix was:
Code:
chmod 600 ~/.ssh/id_rsa
Also the public key shouldn’t have write and execute permissions for group and others. So My change:
Code:
chmod 644 ~/.ssh/id_rsa.pub
Now that I have the correct permissions, I can connect to ssh again. At this time, "it will ask your admin password" to unlock the keys.
EDIT: Going through my notes, it wouldn't hurt to check your /home permissions as well mine were changed to "777" and that's No Good.
Code:
stat /home/$USER
File: /home/me
Size: 82 Blocks: 66 IO Block: 16384 directory
Device: 0,56 Inode: 2 Links: 33
Access: (0750/drwxr-x---) Uid: ( 1000/ me) Gid: ( 1000/ me)
Access: 2024-09-06 11:34:07.682570266 -0600
Modify: 2024-09-06 11:34:07.410573686 -0600
Change: 2024-09-06 11:34:07.410573686 -0600
Birth: 2024-07-16 18:03:58.252613387 -0600
Code:
stat .ssh
File: .ssh
Size: 3 Blocks: 2 IO Block: 512 directory
Device: 0,56 Inode: 128 Links: 2
Access: (0700/drwx------) Uid: ( 1000/ me) Gid: ( 1000/ me)
Access: 2024-09-06 11:37:55.975362466 -0600
Modify: 2024-07-16 18:04:11.492446940 -0600
Change: 2024-07-26 10:21:32.447868621 -0600
Birth: 2024-07-16 18:04:11.491446952 -0600