Bug 252814 - kio_sftp uses a wrong login: seems like it ignores 'user@' syntax
Summary: kio_sftp uses a wrong login: seems like it ignores 'user@' syntax
Status: RESOLVED FIXED
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: sftp (show other bugs)
Version: 4.5
Platform: Ubuntu Linux
: NOR minor
Target Milestone: ---
Assignee: Andreas Schneider
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-30 01:22 UTC by o_O_Tync
Modified: 2010-10-14 23:12 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 4.5.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description o_O_Tync 2010-09-30 01:22:29 UTC
Version:           4.5 (using KDE 4.5.1) 
OS:                Linux

Recently kio_sftp started to use the wrong login.
I have a host with several accounts, all are set to use pubkey auth from my host.
I've created a shortcut name in ~/.ssh/config file:

Host example
        Hostname                        1.2.3.4
        User                            ootync

Now, when opening 'sftp://example/' and 'sftp://other@example/' in Konqueror (as well as in Dolphin) — I'm always logged in as 'ootync':

Sep 30 03:19:00 medikafarm sshd[22781]: Accepted publickey for ootync from 85.141.168.83 port 22210 ssh2
Sep 30 03:19:00 medikafarm sshd[22783]: subsystem request for sftp

Reproducible: Always

Steps to Reproduce:
1. Choose some host with SSH
2. Setup pubkeys auth for SEVERAL logins with ssh-copy-id. E.g. 'ootync' and 'another'
3. Add this to ~/.ssh/config:
Host example
        Hostname                        1.2.3.4
        User                            ootync

4. Try to open 'sftp://another@example/'

Actual Results:  
Log: Accepted publickey for ootync from 85.141.168.83 port 22210 ssh2

Expected Results:  
Log: Accepted publickey for another from 85.141.168.83 port 22210 ssh2

This started to happen recently. The server was not re-configured: the problem is on my site for sure
Comment 1 o_O_Tync 2010-10-03 01:24:17 UTC
Currently, I just replace 'sftp://' with 'fish://' and it starts to work fine.
Tell me I I can provide any additional info
Comment 2 Andreas Schneider 2010-10-04 22:15:18 UTC
This works just fine for me. Which version of libssh do you have installed?
Comment 3 o_O_Tync 2010-10-04 22:55:29 UTC
libssh 4.0.2, as KUbuntu offers.
BTW I've just tested a completely fresh installation (linux, packages, home directory) and copied my .ssh folder there: the problem is still there.

Try this sample to reproduce:
/etc/hosts:
bugtest   <your_server_ip>

~/.ssh/config:
Host bugtest
    Hostname <your_server_ip>
    Username <your_user_1>

sftp://<your_user_2>@bugtest/

Create a file: it should have owner=<your_user_1>, not <your_user_2>
Comment 4 o_O_Tync 2010-10-14 23:12:15 UTC
Updated to 4.5.2: the bug is gone, thanks! :)