Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I set groups:

usermod -G ssh username

and then I've checked account info:

id username

the result is:

uid=1000(username) gid=1001(username) groups=100(username)

Anyway if I try to login using ssh I get an error: Permission denied, please try again.

What I'm doing wrong?

UPDATE1: if I run /usr/sbin/sshd -d the result is:

debug1: sshd version OpenSSH_5.5p1 Debian-6+squeeze1
debug1: read PEM private key done: type RSA
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: private host key: #0 type 1 RSA
debug1: read PEM private key done: type DSA
debug1: Checking blacklist file /usr/share/ssh/blacklist.DSA-1024
debug1: Checking blacklist file /etc/ssh/blacklist.DSA-1024
debug1: private host key: #1 type 2 DSA
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-d'
Set /proc/self/oom_adj from 0 to -17
debug1: Bind to port 22 on 0.0.0.0.
Bind to port 22 on 0.0.0.0 failed: Address already in use.
debug1: Bind to port 22 on ::.
Bind to port 22 on :: failed: Address already in use.
Cannot bind any address.

UPDATE2: The log is:

Dec 29 22:06:44 p148401 sshd[32456]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=changed_host  user=username
Dec 29 22:06:47 p148401 sshd[32456]: Failed password for username from 8*.*.*.* port 52765 ssh2

UPDATE3:

root@p148401:/etc/init.d# sudo service ssh stop
Stopping OpenBSD Secure Shell server: sshd.
root@p148401:/etc/init.d# /usr/sbin/sshd -d
debug1: sshd version OpenSSH_5.5p1 Debian-6+squeeze1
debug1: read PEM private key done: type RSA
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: private host key: #0 type 1 RSA
debug1: read PEM private key done: type DSA
debug1: Checking blacklist file /usr/share/ssh/blacklist.DSA-1024
debug1: Checking blacklist file /etc/ssh/blacklist.DSA-1024
debug1: private host key: #1 type 2 DSA
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-d'
Set /proc/self/oom_adj from 0 to -17
debug1: Bind to port 22 on 0.0.0.0.
Server listening on 0.0.0.0 port 22.
debug1: Bind to port 22 on ::.
Server listening on :: port 22.

And doesn't respond anymore...needs to restart

..and ssh config is here http://codepad.org/8bynXZQC

share|improve this question
    
please give the output of /var/log/auth.log when you get Permission Denied and also give output when you try to login with ssh -v running ssh in verbose mode or run the server in debug mode stop sshd and run start it like this /usr/sbin/sshd -d.Please post these logs here. –  harish.venkat Dec 29 '12 at 17:38
    
I think that the sshd was not started yet. –  ott-- Dec 29 '12 at 18:00
    
added updates, but don't understand what does these log mean –  Anthony Dec 29 '12 at 18:11
    
stop the sshd service by using sudo service ssh stop and then run sudo /usr/sbin/sshd -d –  harish.venkat Dec 29 '12 at 18:12
    
also please give your sshd_config file –  harish.venkat Dec 29 '12 at 18:22
show 4 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.