LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   could use some help with SSH and strictmodes (https://www.linuxquestions.org/questions/linux-newbie-8/could-use-some-help-with-ssh-and-strictmodes-4175492648/)

amrogers3 01-26-2014 01:12 PM

could use some help with SSH and strictmodes
 
I am attempting to setup an SSH pubkey login using a non-root user. I can login if I use a password, however, no go with a public key.

I turned "Strictmodes" to no in the sshd_config file and pubkey login works. However if I leave Strictmodes to yes, I can't log in with pubkey.

I think it is because the group owner is not the user

Code:

drwx------+ 2 amrogers3 share  4096 Jan 26 08:32 .ssh
I am getting an error when I do

Code:

chown -R amrogers3:amrogers3 /home/amrogers3/.ssh

chown: invalid group: `amrogers3:amrogers3'

I tried googling but haven't found a solution. Coming here in a last ditch effort to figure this out. Any help would be greatly appreciated.

Thanks for your time.

lleb 01-26-2014 02:52 PM

read the links in my sig, they should help.

amrogers3 01-26-2014 02:59 PM

Quote:

Originally Posted by lleb (Post 5105654)
read the links in my sig, they should help.

Unfortunately, those links don't really address my issue. Apparently it is a permissions problem and I need to change ownership of the .ssh and authorized_keys file to amrogers3: amrogers3.

When I run chown amrogers3:amrogers3 I get "invalid group: amrogers3:amrogers3"

I can't figure this out. I have reached the end of the internet tried to google this issue.

btmiller 01-26-2014 08:19 PM

It looks like there's no amrogers3 group. Can you type "id" on the command line to see what your account's primary group ID is?

amrogers3 01-26-2014 08:31 PM

Two groups, share and www-data.

i have tried everything I can think of and I cannot login without turning "Strictmode" off in sshd_config.

lleb 01-27-2014 12:04 AM

what is the owner group of your /home directory. again my links talk about permissions.

you could always try running the following command:

Code:

chmod -R go= ~/.ssh
that will set proper strict permissions on the .ssh directory.


All times are GMT -5. The time now is 04:06 PM.