LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 11-08-2006, 05:18 AM   #1
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 524

Rep: Reputation: 31
ssh login unstable


Hi!

I tried today to loggin to my server (FC5) per ssh, and the server kept refusing my password until it finally accepted it, and again refused it by the next try!
I don´ t get it. I must precise, that I´ve never had any ssh problem with my server so far. the passwords that I give in are correct. since today it refuses my passwords most of the time, but sometime accepts them!
I have this problem with my user und with the root user. I tried the connection from 2 computers, it doesn´t change anything. Once I finally managed to logg in, I changed my user´ s password, but then I still couldn´ t login..till I suddenly managed to login again! then again not! and so on!
does anyone understand the cause of the problem? are therr maybe any log files I should looks at?!
hier is what I have in /var/log/Secure:
Quote:
Nov 8 14:11:14 myserver sshd[7259]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=myhost.myworkstation.com user=myuser
Nov 8 14:11:16 myserver sshd[7259]: Failed password for myuser from xxx.xxx.xx.xx port 43399 ssh2
Nov 8 13:11:16 myserver sshd[7260]: Failed password for myuser from xxx.xxx.xx.xx port 43399 ssh2
Nov 8 14:11:23 myserver sshd[7259]: Failed password for myuser from xxx.xxx.xx.xx port 43399 ssh2
Nov 8 13:11:23 myserver sshd[7260]: Failed password for myuser from xxx.xxx.xx.xx port 43399 ssh2
Nov 8 13:12:59 myserver sshd[7260]: Connection closed by xxx.xxx.xx.xx
I do not understand the "pam_unix(sshd:auth)" part. What does it mean?
I would really appreciate any help because the problem is very preoccupying.

Last edited by xpucto; 11-08-2006 at 07:20 AM.
 
Old 11-08-2006, 02:58 PM   #2
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 524

Original Poster
Rep: Reputation: 31
I tried from a third computer at home. The 1st time it worked. Then I tried again, and it didn't accept my password anymore. At the third attempt, I got:
Quote:
Permission denied (publickey,gssapi-with-mic,password)
I still don't get it!

and hier is ssh in verbose mode:
Quote:
ssh -v -l myuser myserver.com
OpenSSH_3.7.1p2, SSH protocols 1.5/2.0, OpenSSL 0.9.7b 10 Apr 2003
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to myserver.com [xxx.xxx.xx.xx] port 22.
debug1: Connection established.
debug1: identity file /home/myuser/.ssh/identity type -1
debug1: identity file /home/myuser/.ssh/id_rsa type -1
debug1: identity file /home/myuser/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.7.1p2
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
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: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'myserver.com' is known and matches the RSA host key.
debug1: Found key in /home/myuser/.ssh/known_hosts:12
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Next authentication method: publickey
debug1: Trying private key: /home/myuser/.ssh/identity
debug1: Trying private key: /home/myuser/.ssh/id_rsa
debug1: Trying private key: /home/myuser/.ssh/id_dsa
debug1: Next authentication method: password
myuser@myserver.com's password:
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
Permission denied, please try again.
myuser@myserver.com's password:
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
Permission denied, please try again.
myuser@myserver.com's password:
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: No more authentication methods to try.
Permission denied (publickey,gssapi-with-mic,password).
debug1: Calling cleanup 0x80645d0(0x0)

Last edited by xpucto; 11-08-2006 at 03:11 PM.
 
Old 11-08-2006, 07:10 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
That's pretty strange. ssh either works or it doesn't, so I'd suspect a non-ssh issue.
Next time you get on, pref from local keyboard, run top and see if the system is under extreme load.
The other possibility is that it's been rooted/hacked, or it's being attempted to be hacked and if you check /var/log/messages or root email, you'll find thousands of root ssh login attempts from botnets. Very common these days.
It's highly recommended that you disable root ssh access and instead grant your non-root acct full access via 'sudo su -'.
Ideally, also restrict range of IPs ssh will respond to.
Of course, it may be none of the above...
 
Old 11-09-2006, 01:33 AM   #4
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 524

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by chrism01
That's pretty strange. ssh either works or it doesn't, so I'd suspect a non-ssh issue.
Next time you get on, pref from local keyboard, run top and see if the system is under extreme load.
The other possibility is that it's been rooted/hacked, or it's being attempted to be hacked and if you check /var/log/messages or root email, you'll find thousands of root ssh login attempts from botnets. Very common these days.
It's highly recommended that you disable root ssh access and instead grant your non-root acct full access via 'sudo su -'.
Ideally, also restrict range of IPs ssh will respond to.
Of course, it may be none of the above...
thank you for your answer. You seem to be pretty right. I tried to loggin from the keyboard. It doens't work either. last night I could once loggin and I created a new user (unfortunatly it doesn't have any root rights). since then it is the only user that doens't have any problem to loggin.
in /var/lg/messages there are indeed thousand attempts to loggin as a root. But I've always seen such attempts, is one supposed to react when seeing such attempts? because there are actually continually happening. Am I suppposed to exclude the IP address (within the firewall) each time?!

As soon as I managed to loggin again I'll do what you adviced me.
But I can I get things back so that I do not have any loggins problems anymore?
How may I prevent this in the future? I actually have configured a firewall.

Last edited by xpucto; 11-09-2006 at 01:35 AM.
 
  


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
SSH login veeruk101 Linux - Newbie 12 03-14-2006 09:17 AM
is ubuntu unstable less unstable than debian unstable? lefty.crupps Ubuntu 9 10-14-2005 01:38 PM
unstable HTTP/SSH server with Linksys router hamish Linux - Networking 0 07-22-2004 01:45 PM
ftp login -- ssh no login waffe Linux - General 4 12-27-2003 12:42 AM
SSH Login Again gsibble Linux - Newbie 13 08-11-2003 03:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:59 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