Authentication with ssh and scp works but not WinSCP

1

1

I have a Ubuntu server with 3 user accounts (root, user1, user2). user1 has access via WinSCP, scp and ssh. No problems here. Then I've created another user2 but with this user I can't access the server via WinSCP but scp and ssh through console works like a charm. WinSCP says that authentication fails but I'm 100% sure that I have made no typo (I can say this after 433245 retries). Now I'm trying to find the differences between the two user accounts and the only differences are their username, password and user2 is in the sudoers group.

Any suggestions what else I can try?

seveves

Posted 2015-04-20T10:05:39.843

Reputation: 163

Answers

2

Changing password of user2 fixed the issue. Now I am not sure if it has something to do with encoding or escaping of the password inside of WinSCP or any other weird problem.

EDIT 1: I changed the password back to the one not working and tried to find the special char causing problems. It was a the non-ASCII char '§' causing the problem. I tried another password with non-ASCII char 'ß' and this one didn't work too. So non-ASCII chars in UNIX-passwords are not a good idea.

EDIT 2: Bugreport was added to the WinSCP forum: http://winscp.net/forum/viewtopic.php?p=56296#56296

seveves

Posted 2015-04-20T10:05:39.843

Reputation: 163

well, that would be easy for you to troubleshoot. Try changing it back to the password where you had the issue. Then troubleshoot to find what aspect of the broken password isn't working. And if when you change it back to the old password, then it now works, then you probably simply got the password wrong, making a typo either when setting the password on the user account, or when logging into it.. – barlop – 2015-04-20T11:29:20.393

Thats a good hint. I'll try to check what part of the password makes trouble. I'm very sure that is was no typo because logging in through a console/bash was no problem. Maybe it has something to do with encoding. Thank you! :) – seveves – 2015-04-23T07:16:51.297

also, the general troubleshooting point for after fixing it if you think you'll be able to fix it again and you want to investigate more what fixed it, is to try to reproduce the problem. – barlop – 2015-04-23T07:36:45.377

Edited my answer. Non-ASCII chars causing the problem. – seveves – 2015-04-23T07:37:30.487

now you have a good answer, you can accept your own answer (that's good for the database, having good Q n As). Note- sometimes superuser only lets you accept it after 2 days of it being posted. – barlop – 2015-04-23T07:37:56.703

So, WinSCP fails.. How about ssh and scp? – barlop – 2015-04-23T07:39:38.003

scp and ssh work like a charm event with non-ASCII chars – seveves – 2015-04-23T07:41:13.180

Let us continue this discussion in chat.

– barlop – 2015-04-23T07:54:37.167

0

Use WinSCP 5.9 or newer. These versions do encode usernames and passwords using UTF-8 encoding.

See https://winscp.net/tracker/1014

Martin Prikryl

Posted 2015-04-20T10:05:39.843

Reputation: 13 764