LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 12-01-2003, 05:56 PM   #1
zergio
LQ Newbie
 
Registered: Dec 2003
Location: Missoula, Montucky
Distribution: Redhat, mandrake, debian
Posts: 7

Rep: Reputation: 0
Question ssh password failure (sometimes)


I am opperating on a fresh install of Debian 3.

I have openssh3.4 running, and am using shadowed passwords.

When I first installed the system everything was working fine... no problems logging in.

Then I changed the password for one of my usernames and I can no longer log in:

"sergio@aegir's password:
Permission denied, please try again."

basic error. I have changed the password again and again, to simple things and it still doesn't work.

Logs say:
Dec 1 13:06:48 aegir sshd[176]: Failed password for sergio from 10.0.6.23 port 2458 ssh2
Dec 1 13:07:05 aegir sshd[176]: Failed password for sergio from 10.0.6.23 port 2458 ssh2
Dec 1 13:07:49 aegir sshd[176]: Failed password for sergio from 10.0.6.23 port 2458 ssh2

However, I can still log in as root as I never changed the root password.

I also tried adding a new user (user showed up in passwd and shadow) but I cannot auth with that user either.

Helpings?! Thanks!
 
Old 12-02-2003, 09:03 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
First of all you should upgrade ASAP to OpenSSH_3.7.1p2.
Then log in again using triple v's: "ssh -l sergio <host> -v -v 2>&1| tee ~/sshlogin.log", this saves all output in the file ~/sshlogin.log. Check it for errors or post the log but make sure to rip out any details like IP addresses.
 
Old 12-03-2003, 10:41 AM   #3
zergio
LQ Newbie
 
Registered: Dec 2003
Location: Missoula, Montucky
Distribution: Redhat, mandrake, debian
Posts: 7

Original Poster
Rep: Reputation: 0
Well, I upgraded to 3.7.1p2 and installed from source this time. However, I now cannot get in at all with any users. I installed using the --with-md5-passwords option because I selected md5 during the debian install and when I tried to install ssh with PAM I was told that the PAM headers could not be found.

Anyway, below is the output from the shloging.log you had me create. Thanks so much for your help! This one's got me baffled.... Strangely enough it looks like it auths me, connects me (somewhat) and then kicks me out.

OpenSSH_3.1p1, SSH protocols 1.5/2.0, OpenSSL 0x0090602f
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug1: restore_uid
debug1: ssh_connect: getuid 500 geteuid 0 anon 1
debug1: Connecting to aegir [x.x.x.x] port 22.
debug1: temporarily_use_uid: 500/500 (e=0)
debug1: restore_uid
debug1: temporarily_use_uid: 500/500 (e=0)
debug1: restore_uid
debug1: Connection established.
debug1: read PEM private key done: type DSA
debug1: read PEM private key done: type RSA
debug1: identity file /home/sergio/.ssh/identity type -1
debug1: identity file /home/sergio/.ssh/id_rsa type -1
debug1: identity file /home/sergio/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_3.7.1p2
debug1: match: OpenSSH_3.7.1p2 pat OpenSSH*
Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.1p1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none
debug2: kex_parse_kexinit: none
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: mac_init: found hmac-md5
debug1: kex: server->client aes128-cbc hmac-md5 none
debug2: mac_init: found hmac-md5
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: dh_gen_key: priv key bits set: 128/256
debug1: bits set: 1618/3191
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'aegir' is known and matches the RSA host key.
debug1: Found key in /home/sergio/.ssh/known_hosts:13
debug1: bits set: 1530/3191
debug1: ssh_rsa_verify: signature correct
debug1: kex_derive_keys
debug1: newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: waiting for SSH2_MSG_NEWKEYS
debug1: newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: done: ssh_kex2.
debug1: send SSH2_MSG_SERVICE_REQUEST
debug1: service_accept: ssh-userauth
debug1: got SSH2_MSG_SERVICE_ACCEPT
debug1: authentications that can continue: publickey,password,keyboard-interactive
debug1: next auth method to try is publickey
debug1: try privkey: /home/sergio/.ssh/identity
debug1: try privkey: /home/sergio/.ssh/id_rsa
debug1: try privkey: /home/sergio/.ssh/id_dsa
debug2: we did not send a packet, disable method
debug1: next auth method to try is keyboard-interactive
debug2: userauth_kbdint
debug2: we sent a keyboard-interactive packet, wait for reply
debug1: authentications that can continue: publickey,password,keyboard-interactive
debug2: we did not send a packet, disable method
debug1: next auth method to try is password
sergio@aegir's password:
debug1: packet_send2: adding 64 (len 55 padlen 9 extra_pad 64)
debug2: we sent a password packet, wait for reply
debug1: ssh-userauth2 successful: method password
debug1: fd 5 setting O_NONBLOCK
debug2: fd 6 is O_NONBLOCK
debug1: channel 0: new [client-session]
debug1: send channel open 0
debug1: Entering interactive session.
debug2: callback start
debug1: ssh_session2_setup: id 0
debug1: channel request 0: pty-req
debug1: channel request 0: shell
debug1: fd 3 setting TCP_NODELAY
debug2: callback done
debug1: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel 0: rcvd adjust 131072
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
Last login: Wed Dec 3 09:33:42 2003 from
Linux aegir 2.4.18 #2 Thu Apr 11 14:37:17 EDT 2002 sparc64 unknown

Most of the programs included with the Debian GNU/Linux system are
freely redistributable; the exact distribution terms for each program
are described in the individual files in /usr/share/doc/*/copyright

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
System bootup in progress - please wait
debug1: channel 0: rcvd eof
debug1: channel 0: output open -> drain
debug1: channel 0: obuf empty
debug1: channel 0: close_write
debug1: channel 0: output drain -> closed
debug1: channel 0: rcvd close
debug1: channel 0: close_read
debug1: channel 0: input open -> closed
debug1: channel 0: almost dead
debug1: channel 0: gc: notify user
debug1: channel 0: gc: user detached
debug1: channel 0: send close
debug1: channel 0: is dead
debug1: channel 0: garbage collecting
debug1: channel_free: channel 0: client-session, nchannels 1
debug1: fd 1 clearing O_NONBLOCK
debug2: fd 2 is not O_NONBLOCK
Connection to aegir closed.
debug1: Transferred: stdin 0, stdout 0, stderr 29 bytes in 0.1 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 474.4
debug1: Exit status 254
 
Old 12-03-2003, 10:43 AM   #4
zergio
LQ Newbie
 
Registered: Dec 2003
Location: Missoula, Montucky
Distribution: Redhat, mandrake, debian
Posts: 7

Original Poster
Rep: Reputation: 0
Note: When I try to connect using secureCRT, I get a similar response:


"Last login: Wed Dec 3 09:34:15 2003 from
Linux aegir 2.4.18 #2 Thu Apr 11 14:37:17 EDT 2002 sparc64 unknown

Most of the programs included with the Debian GNU/Linux system are
freely redistributable; the exact distribution terms for each program
are described in the individual files in /usr/share/doc/*/copyright

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
System bootup in progress - please wait"


Then I'm kicked instantly. If I hit enter it asks me to log in again.
 
Old 12-03-2003, 10:45 AM   #5
zergio
LQ Newbie
 
Registered: Dec 2003
Location: Missoula, Montucky
Distribution: Redhat, mandrake, debian
Posts: 7

Original Poster
Rep: Reputation: 0
One more thing... I don't know if it matters but I still have one open session on the old 3.4 ssh daemon running. I didn't want to kill that process because I still want to have an open term to the box.
 
Old 12-06-2003, 12:50 AM   #6
zergio
LQ Newbie
 
Registered: Dec 2003
Location: Missoula, Montucky
Distribution: Redhat, mandrake, debian
Posts: 7

Original Poster
Rep: Reputation: 0
repost. I'm a cheater. This problem is unresolved and is driving me crazy.... please HELP!!!
 
Old 12-10-2003, 09:54 AM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
repost. I'm a cheater.
No, that's OK. We call it "bumping" a post. Np.

Check /etc/pam.d/login for a line "auth requisite pam_nologin.so" (should be there), then look around for a file either called /fastboot, /etc/nologin or /etc/nologin.boot. These originate from a shutdown option or made/removed from /etc/init.d/boot.
 
Old 12-10-2003, 12:13 PM   #8
zergio
LQ Newbie
 
Registered: Dec 2003
Location: Missoula, Montucky
Distribution: Redhat, mandrake, debian
Posts: 7

Original Poster
Rep: Reputation: 0
Thank you unSpawn.
I deleted the /etc/nologin file and now I can ssh in with no problems. I then did a reboot and the file came back, locking me out again. Grepping the /etc/init.d directory reveals a rmnologin script, but it doesn't seem to be called from anywhere...

Could you tell me at what point in the boot up process that script should be called to remove the /etc/nologin file?

Thank you!!!
 
Old 12-10-2003, 05:17 PM   #9
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Should be (symlinked) in the runlevel you boot into IIRC.
 
Old 12-10-2003, 08:21 PM   #10
zergio
LQ Newbie
 
Registered: Dec 2003
Location: Missoula, Montucky
Distribution: Redhat, mandrake, debian
Posts: 7

Original Poster
Rep: Reputation: 0
Got it figured out.

Thanks for all your help!
 
  


Reply



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
su root: authentication failure (password correct) scs_24 Linux - Newbie 3 12-12-2009 01:07 AM
password failure RH9 - hacked? jdraper Linux - Security 3 06-29-2005 01:53 PM
Mandrake 10.1 PPC Password failure johnnyLongside Mandriva 2 01-02-2005 06:23 PM
Smoothwall SSH Failure extremebfn Linux - Networking 1 08-27-2004 12:38 PM
Samba - Win workstation, Linux Fileserver, password failure cornellS Linux - Networking 12 02-05-2004 07:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 12:10 AM.

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
Open Source Consulting | Domain Registration