LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-11-2008, 02:32 PM   #1
CaptainReboot
LQ Newbie
 
Registered: Dec 2007
Location: UK
Distribution: Debian (lenny), arm-linux (on GP2x)
Posts: 15

Rep: Reputation: 0
SSH login not working following password change


Hi all,

I recently had an issue where I could no longer su to root when logged into an SSH session using Putty on a windows box. I could login using my username and password, but when I entered the root password after typing the 'su' command I got authentication failure. The wiered thing was that if I SSH'd from a linux box it all worked perfectly, including su'ing to root.

I now have a problem using Putty to login using my own username and password. This was all working perfectly until I changed my password. As soon as I changed my password I could no longer login via an ssh session. I can login locally so I know my credentials are correct, but I cannot log in using an SSH session. Putty gives me an 'access denied' message.

I should also mention that this all still works great when establishing an ssh connection from a linux box. The only time I get issues is when ssh'ing from any Windows box running any ssh client (I've tried several).

Can anyone help me?

Many thanks,

CR.

Last edited by CaptainReboot; 03-11-2008 at 03:39 PM.
 
Old 03-11-2008, 04:40 PM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
So ssh is working on your linux boxes. Good
Quote:
I get issues is when ssh'ing from any Windows box running any ssh client (I've tried several).
Errrr, complain to Microsoft?
Quote:
Can anyone help me?
Dump the windows boxes if they don't work as advertised?

Seriously though:
Check your
/etc/ssh/ssh_config
/etc/ssh/sshd_config

Maybe there is something in there that is not allowing access from your win machines (I no longer use them, so can't help from that end )
 
Old 03-11-2008, 04:56 PM   #3
CaptainReboot
LQ Newbie
 
Registered: Dec 2007
Location: UK
Distribution: Debian (lenny), arm-linux (on GP2x)
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by tredegar View Post
Seriously though:
Check your
/etc/ssh/ssh_config
/etc/ssh/sshd_config

Maybe there is something in there that is not allowing access from your win machines (I no longer use them, so can't help from that end )
I can't see anything obvious in there. I'm a bit confused as to why it would fail only after a password change and only on Windows SSH clients. Very strange!
 
Old 03-11-2008, 05:20 PM   #4
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Is there a newer version of putty you could try?

Try connecting without using a stored profile if you use stored profiles in putty - perhaps connect to the IP rather than hostname. Mix it up a bit.

Last edited by billymayday; 03-11-2008 at 05:21 PM.
 
Old 03-11-2008, 05:40 PM   #5
CaptainReboot
LQ Newbie
 
Registered: Dec 2007
Location: UK
Distribution: Debian (lenny), arm-linux (on GP2x)
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by billymayday View Post
Is there a newer version of putty you could try?

Try connecting without using a stored profile if you use stored profiles in putty - perhaps connect to the IP rather than hostname. Mix it up a bit.

I've been trying different settings within putty and I've just downloaded the latest version. I've also tried connecting using the IP address instead of the hostname, nothing has worked.

It must be a problem with the users I have setup. The fault seems to occur after a password change. There are a couple of other users configured which are still working fine.
 
Old 03-11-2008, 05:48 PM   #6
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by CaptainReboot
I should also mention that this all still works great when establishing an ssh connection from a linux box. The only time I get issues is when ssh'ing from any Windows box running any ssh client (I've tried several).
If this is on your debian box, check /var/log/auth.log for clues about why authentication is failing. My guess is the Windows client is doing something strange (e.g.: requiring protocol 1 or similar nonsense).
 
Old 03-11-2008, 06:43 PM   #7
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Well, I think we have to go back to basics.

Let's start with where you changed your password. On your win Pc or linux Pc? I don't think you have made this clear.
Where did you change your password? Why did you change your password? How did you change it?

You need to be methodical: try changing your password back to what it was. Any better?

You haven't told us about where you are trying to connect to with "putty" - is it on your personal LAN or over the internet?

You are not giving us any error messages (Eg "win says this ...., but linux says this ..."). Win tends to say nothing useful (and not work), and linux tends to say "Authentication refused because ..." which gives you a starting point for troubleshooting.
Linux's error messages tend to be specific, to the point, informative (and terse ). Please post them.

If you were trying to ssh from a linux box, I'd recommend you try a ssh -vv user@hostname the -vv option is for "very verbose", and it'll tell you exactly what it is trying to do, and what, if anything, is failing, I am not sure "putty" offers this option, but it is worth a try.

Do you have firewalls on any of these machines? What are they, and how are they configured?

Please start by composing a post to LQ, offline, always asking yourself "Have I left any information out?". If so, research it, and then include it.

I have in the past been presented with linux problems that I thought I couldn't solve. So I slowly generated a Q for LQ in my text-editor. By the time I thought I had answered all the potential "Idiot: you stupidly omitted to check if ..." replies, and was ready to post it, I had solved the problem for myself YMMV

We are still here to help you (though I can no longer help with windows things, I abandoned that at win98 )
 
Old 03-11-2008, 06:54 PM   #8
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Another question to add is what authentication method you use on the target
 
Old 03-12-2008, 03:37 AM   #9
CaptainReboot
LQ Newbie
 
Registered: Dec 2007
Location: UK
Distribution: Debian (lenny), arm-linux (on GP2x)
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by tredegar View Post
Well, I think we have to go back to basics.
Let's start with where you changed your password. On your win Pc or linux Pc? I don't think you have made this clear.
Where did you change your password?
Within my SSH session.

Quote:
Originally Posted by tredegar View Post
Why did you change your password? How did you change it?
Because I hadn't changed it in a while. I changed it by typing 'passwd'

Quote:
Originally Posted by tredegar View Post
You need to be methodical: try changing your password back to what it was. Any better?
I've tried that already. Unfortunately it didn't work.

Quote:
Originally Posted by tredegar View Post
You haven't told us about where you are trying to connect to with "putty" - is it on your personal LAN or over the internet?
On my LAN.

Quote:
Originally Posted by tredegar View Post
You are not giving us any error messages (Eg "win says this ...., but linux says this ..."). Win tends to say nothing useful (and not work), and linux tends to say "Authentication refused because ..." which gives you a starting point for troubleshooting.
Linux's error messages tend to be specific, to the point, informative (and terse ). Please post them.
Putty just reports 'Access Denied' when I login using the username and password I always use when logging in locally.

Quote:
Originally Posted by tredegar View Post
If you were trying to ssh from a linux box, I'd recommend you try a ssh -vv user@hostname the -vv option is for "very verbose", and it'll tell you exactly what it is trying to do, and what, if anything, is failing, I am not sure "putty" offers this option, but it is worth a try.
I haven't tried this from a Linux box as the fault doesn't occur in this case, but I will try it. Like you, I'm not sure if Putty has this capability. I'll check.

Quote:
Originally Posted by tredegar View Post
Do you have firewalls on any of these machines? What are they, and how are they configured?
Yes, but I switched them off to check whether these were causing the problem.

Quote:
Originally Posted by tredegar View Post
Please start by composing a post to LQ, offline, always asking yourself "Have I left any information out?". If so, research it, and then include it.
Will do.

Quote:
Originally Posted by tredegar View Post
We are still here to help you (though I can no longer help with windows things, I abandoned that at win98 )
I'm trying this from my company issue laptop. Unfortunately they aren't as keen on Linux as me!

I'm fairly confident that my user and the root user are broken in some way. To test I'll create a new user and login. After this I'll change the password and see if it breaks. I'll also try SSH'ing to another box to see if I get similar results. I'm also going to check the logs on the Debian box I'm trying to ssh into.

Thanks for all the help so far.
 
Old 03-12-2008, 01:30 PM   #10
CaptainReboot
LQ Newbie
 
Registered: Dec 2007
Location: UK
Distribution: Debian (lenny), arm-linux (on GP2x)
Posts: 15

Original Poster
Rep: Reputation: 0
I think I know what the problem is. It seems that the problem occurs from Windows clients when the password contains a '£' symbol. Any user with a '£' within their password has this problem.

I'll post again when I can confirm this.
 
Old 03-12-2008, 06:57 PM   #11
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Now that wouldn't surprise me, as it doesn't exist on non-UK keybds. Usually '#'. On the '3' key?
 
Old 03-13-2008, 04:58 PM   #12
CaptainReboot
LQ Newbie
 
Registered: Dec 2007
Location: UK
Distribution: Debian (lenny), arm-linux (on GP2x)
Posts: 15

Original Poster
Rep: Reputation: 0
I can now confirm this was definately the case. To resolve the problem I had to login locally and change any passwords which contained the '£' symbol even though all systems have the UK keyboard layout and the '£' symbol (shift 3) is in the correct place all the time.

There is something in the Windows SSH clients that doesn't like the '£' sign. So far I have not found any other symbols which cause any problems. Would someone be willing to test this on their systems to see if it is something particular to my setup?
 
Old 03-13-2008, 05:47 PM   #13
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Quote:
There is something in the Windows SSH clients that doesn't like the '£' sign.
Hmmmm. I probably don't have the answer you'd like, but here are some pointers:

When I used to use win98, and did an internet search, and clicked on links, sometimes I'd end up somewhere where the characters wouldn't render in my browser - I just got little "squares". So I thought, OK, foreign script, it will not render, and I probably cannot read it, so move on to the next link.

When I moved to linux, these sites would be beautifully rendered in their proper fonts - Thai, korean, chinese, whatever. I still couldn't read them, but they were properly rendered for me, and if I had a Thai friend to hand to read and translate them for me they probably would have been useful.

The bottom line is that linux's internationalisation ( i18n for short: that's an "i" then 18 letters then an "n", and a pain to type otherwise) just works. Win, or putty, seems to be broken when it comes to "strange characters". But I wouldn't have thought that £ was that strange - it's in the plain 8-bit ASCII table, unlike the symbol which is properly rendered on this (linux-driven) board. Along with a load of chinese, russian and many other character sets, but I'll resist the temptation to post examples, in case I inadvertently say something rude.

Weird, but I am glad you have (sort of) solved your problem.

[Edit]:
Quote:
There is something in the Windows SSH clients that doesn't like the '£' sign. So far I have not found any other symbols which cause any problems.
How about the # | or @ signs - do they cause problems?
[/Edit]

Last edited by tredegar; 03-13-2008 at 05:51 PM. Reason: See tags
 
Old 03-14-2008, 12:15 AM   #14
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
It's been a while since I dealt with MS, but iirc, there was definitely >1 place where you could set the default 'nationality', inc some apps had their own separate setting.
MS usually defaults to USA, given half a chance...
 
Old 03-20-2008, 06:41 AM   #15
CaptainReboot
LQ Newbie
 
Registered: Dec 2007
Location: UK
Distribution: Debian (lenny), arm-linux (on GP2x)
Posts: 15

Original Poster
Rep: Reputation: 0
Everything seems to be set to UK, and when I type a £ on the SSH session a £ sign appears.

It's very wiered and I'll keep searching for an answer. I can tell you that I have tested the following symbols and they work -- # $ % * % -- it just seems to be the £ sign I'm having problems.

It doesn't matter too much. I'll just steer clear of that symbol in any passwords.
 
  


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 without password centos1986 Linux - Security 1 05-01-2007 07:45 AM
SSH Login with no password mperkel Linux - Security 3 01-16-2007 08:42 AM
change login password sunhui Linux - Software 1 06-16-2006 04:49 AM
Can't change password through SSH Juan Quesada Linux - Security 1 08-16-2004 03:01 PM
Change password on first login mneves Linux - General 2 04-20-2004 04:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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