Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ssh connection problems
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
demonace
n00b
n00b


Joined: 15 Apr 2002
Posts: 9

PostPosted: Tue Apr 16, 2002 5:23 am    Post subject: ssh connection problems Reply with quote

i am having a problem connecting to my gentoo box with ssh as any user other than root.

i can ssh from another linux box(mandrake) or using putty on a win box and log in as root.

useing a username always gives me auth problems. but i can use the user name in a local login and it works fine. All i can think of is that the sshd is not reading the passwords properly.

i get the key host key fine.

I'm not familer with openssh setup enough to know what to look for. any ideas?

i have also tried "emerge openssh" again. and no luck.

i have also made sure several times that the password is correct.

i'm at a loss at the moment.
Back to top
View user's profile Send private message
anonymous coward
Guest





PostPosted: Tue Apr 16, 2002 1:24 pm    Post subject: ssh Reply with quote

SSH is not set up automagically. You will need to edit some conf files. Man sshd for more information. Basically you have to allow users or groups in sshd conf file.
Back to top
demonace
n00b
n00b


Joined: 15 Apr 2002
Posts: 9

PostPosted: Tue Apr 16, 2002 7:09 pm    Post subject: still no luck Reply with quote

I have looked at a working SSH setup and edited the gentoo machine setup. still can log in as root, not as user.

was there info that i missed after openssh installed?
Back to top
View user's profile Send private message
warren smith
Guest





PostPosted: Tue Apr 16, 2002 8:40 pm    Post subject: Re: still no luck Reply with quote

i am also having the same problem.

line from passwd:
Code:
wsmith:x:1000:100::/home/wsmith:/bin/bash


i copied the sshd_config from a working box as well, with no luck. Also tried AllowUsers/AllowGroups commands in config file.
Back to top
Nitro
Bodhisattva
Bodhisattva


Joined: 08 Apr 2002
Posts: 661
Location: San Francisco

PostPosted: Tue Apr 16, 2002 8:55 pm    Post subject: Reply with quote

I have ssh running with just the following in my config file:
Code:
Port 22
Protocol 2
ListenAddress 0.0.0.0


Might want to take a look at the permissions on the user's home directory too. If permissions aren't the problem, make sure you did set a password (everyone forgets the simple things sometimes ;)). If you are still having problems, look for authentication failure information in you you log files (directory is: /var/log/ ) and post it here.
_________________
- Kyle Manna

Please, please SEARCH before posting.

There are three kinds of people in the world: those who can count, and those who can't.
Back to top
View user's profile Send private message
warren smith
Guest





PostPosted: Tue Apr 16, 2002 10:41 pm    Post subject: Reply with quote

got it! it was in the sshd_config file. thanks!
Back to top
demonace
n00b
n00b


Joined: 15 Apr 2002
Posts: 9

PostPosted: Tue Apr 16, 2002 11:55 pm    Post subject: Reply with quote

Apr 16 13:58:07 [sshd] debug1: Starting up PAM with username "demonace"
Apr 16 13:58:07 [sshd] debug3: Trying to reverse map address 192.168.1.42.
Apr 16 13:58:07 [sshd] debug1: PAM setting rhost to "host"
Apr 16 13:58:07 [sshd] debug1: Attempting authentication for demonace.
Apr 16 13:58:13 [sshd] debug1: PAM Password authentication for "demonace" failed[7]: Authentication failure
This is the error message, i setup LogLevel DEBUG3 in the sshd_config file.

i have reset the password to several times, and i don't know why i can't login non root.
Back to top
View user's profile Send private message
Nitro
Bodhisattva
Bodhisattva


Joined: 08 Apr 2002
Posts: 661
Location: San Francisco

PostPosted: Wed Apr 17, 2002 12:05 am    Post subject: Reply with quote

Can you give me the contents of /etc/pam.d/sshd?

My /etc/pam.d/sshd contains:
Code:
#%PAM-1.0

auth       required     pam_stack.so service=system-auth
auth       required     pam_shells.so
auth       required     pam_nologin.so
account    required     pam_stack.so service=system-auth
password   required     pam_stack.so service=system-auth
session    required     pam_stack.so service=system-auth

_________________
- Kyle Manna

Please, please SEARCH before posting.

There are three kinds of people in the world: those who can count, and those who can't.
Back to top
View user's profile Send private message
demonace
n00b
n00b


Joined: 15 Apr 2002
Posts: 9

PostPosted: Wed Apr 17, 2002 12:21 am    Post subject: Reply with quote

here is my /etc/pam.d/sshd

Code:

#%PAM-1.0

auth       required     pam_stack.so service=system-auth
auth       required     pam_shells.so
auth       required     pam_nologin.so
account    required     pam_stack.so service=system-auth
password   required     pam_stack.so service=system-auth
session    required     pam_stack.so service=system-auth

its the same as what your sys has

but i found the problem when i was going to include part of my /etc/passwd

Code:

demonace:x:1004:100::/home/demonace:


i fixed it to

Code:

demonace:x:1004:100::/home/demonace:/bin/bash


and now i can login, it seems that useradd is broken
or i'm just used to /bin/bash being included automaticly
Back to top
View user's profile Send private message
Cr0t
l33t
l33t


Joined: 27 Apr 2002
Posts: 944
Location: USA

PostPosted: Tue May 07, 2002 10:27 pm    Post subject: Reply with quote

thx man i had the same problem
;)
_________________
cya
    ©®0t
Back to top
View user's profile Send private message
Nitro
Bodhisattva
Bodhisattva


Joined: 08 Apr 2002
Posts: 661
Location: San Francisco

PostPosted: Tue May 07, 2002 10:32 pm    Post subject: Reply with quote

demonace wrote:
it seems that useradd is broken
or i'm just used to /bin/bash being included automaticly


If you want to set your default shell to /bin/bash do:
Code:
useradd -D -s /bin/bash

_________________
- Kyle Manna

Please, please SEARCH before posting.

There are three kinds of people in the world: those who can count, and those who can't.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Sun Aug 18, 2002 3:06 pm    Post subject: Reply with quote

From Bugs to Networking & Security.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum