LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-26-2014, 02:12 PM   #1
amrogers3
Member
 
Registered: Jan 2004
Posts: 43

Rep: Reputation: 15
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.
 
Old 01-26-2014, 03:52 PM   #2
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
read the links in my sig, they should help.
 
Old 01-26-2014, 03:59 PM   #3
amrogers3
Member
 
Registered: Jan 2004
Posts: 43

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by lleb View Post
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.
 
Old 01-26-2014, 09:19 PM   #4
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
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?
 
Old 01-26-2014, 09:31 PM   #5
amrogers3
Member
 
Registered: Jan 2004
Posts: 43

Original Poster
Rep: Reputation: 15
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.
 
Old 01-27-2014, 01:04 AM   #6
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with Ubuntu server remote ssh and local network ssh issues using putty. scottpops Linux - Server 8 05-17-2012 06:07 PM
ssh-agent, ssh-add and ssh-keygen AND CVS raylpc Linux - General 2 11-19-2008 03:50 AM
setting up an ssh soxy or local ssh tunnel from within an ssh soxy Mangenius Linux - Networking 0 03-05-2007 04:15 PM
Passwordless SSH with SSH commercial server and open ssh cereal83 Linux - General 7 04-18-2006 01:34 PM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration