Version: 1.7 (using KDE 4.7.0) OS: Linux When I try to access an sftp url in dolphin, it shows "authentication failed" at the bottom and "loading folder..." at the bottom right, with a kind of progress bar that goes back and forth forever. There is no login dialog, and it doesn't do anything. Reproducible: Always Steps to Reproduce: Try going to sftp://some_server Expected Results: Login dialog if not already logged in; listing the files afterwards
Thanks for taking the time to report a bug. I'm not able to reproduce the bug you're describing. Everything works just fine here. Please provide log files, see: http://techbase.kde.org/Development/Tutorials/Debugging/Debugging_IOSlaves/Debugging_kio_sftp
Created attachment 62409 [details] kio_sftp log I enabled logging for kio_sftp as instructed there and got some log output. Let me know if you need more information.
To what kind of server are you trying to connect. It looks like the authentication has been canceled by the server.
It's my Linux laptop, to which I previously connected hundreds of times. ssh and sftp from the command line work with no problems, and sftp in dolphin worked well in kde 4.6.3 from what I remember. Also, now sftp in dolphin fails in the same way with any server, not just with this one.
I think this is missing ECDSA host key support in libssh: https://red.libssh.org/issues/29
Hm.. that's possible. That bug report refers to kde bug 270322 and it is mentioned there that the necessary code has been added to libssh and will be available in libssh 0.6. Since the latest available libssh version seems to be 0.5.0, I guess I'll have to try the latest code from their repository.
Well, I think it's not that. I installed the latest libssh from git and restarted the computer, the problem remains the same. Besides, I checked in known_hosts and "sente" is listed with "ssh-rsa". What about the error canonicalizing the "." path?
I dunno what the error is without a libssh or server log. It is described in the debug howto how to enable it.
Sure, I said let me know if you need more information. I'll post the log with libssh info in a minute.
Created attachment 62433 [details] kio_sftp + libssh log Log with libssh (latest git) debug information. I'll see if I can get something on the server too.
Oh, I ran "KIO_SFTP_LOG_VERBOSITY=1 kdeinit4" in konsole, and I noticed that later printed out this stuff while sftp failed: kioslave: ####### CRASH ###### protocol = kio_sftp pid = 21996 signal = 11 [1] Reading configuration data from /etc/ssh/ssh_config [1] Reading configuration data from /etc/ssh/ssh_config kio_sftp(21997)/kio (kioslave) KIO::SlaveBase::error: error() called twice! Please fix the KIO slave. [1] Reading configuration data from /etc/ssh/ssh_config kioslave: ####### CRASH ###### protocol = kio_sftp pid = 21998 signal = 11 kio_sftp(21997)/kio (kioslave) KIO::SlaveBase::error: error() called twice! Please fix the KIO slave. [1] Reading configuration data from /etc/ssh/ssh_config kio_sftp(21997)/kio (kioslave) KIO::SlaveBase::error: error() called twice! Please fix the KIO slave.
Created attachment 62434 [details] sshd log And here is the debug log from the ssh server.
Ouch, this is bad. Do you know how to use gdb an get a backtrace? How to attach gdb is described here: http://techbase.kde.org/Development/Tutorials/Debugging/Debugging_IOSlaves
I'm familiar with GUI debuggers but not much with gdb. Mainly, I don't know where and how to stop the process to get the backtrace. This is what I got so far: #0 0x00007faed568e663 in select () from /lib64/libc.so.6 #1 0x00007faed6ca54ee in qt_safe_select(int, fd_set*, fd_set*, fd_set*, timeval const*) () from /usr/lib64/qt4/libQtCore.so.4 #2 0x00007faed4a53088 in ?? () from /usr/lib64/qt4/libQtNetwork.so.4 #3 0x00007faed4a3a326 in ?? () from /usr/lib64/qt4/libQtNetwork.so.4 #4 0x00007faed4a4ad80 in QAbstractSocket::waitForReadyRead(int) () from /usr/lib64/qt4/libQtNetwork.so.4 #5 0x00007faecab7557a in ?? () from /usr/lib64/libkio.so.5 #6 0x00007faecac53149 in KIO::SlaveBase::dispatchLoop() () from /usr/lib64/libkio.so.5 #7 0x00007faec0871ee1 in kdemain () from /usr/lib64/kde4/kio_sftp.so #8 0x0000000000407fd3 in _start ()
The username redirection is strange. I've might fixed but I'm not sure. Do you have a config file for this server?
What config file? You mean for sshd? Here are all the lines that don't start with a #: PermitRootLogin no PasswordAuthentication no UsePAM yes X11Forwarding yes PrintMotd no PrintLastLog no Subsystem sftp /usr/lib64/misc/sftp-server openssh version is 5.8_p1-r1
Does it work if you specify a username? sftp://user@host
Created attachment 62445 [details] kio_sftp log with username specified This way I get a login dialog, but then the password doesn't work (and yes I'm 100% sure I typed the correct password). On the server I can see some "authentication failure" messages.
Oh, btw, I see that sftp://user:password@host works, but I shouldn't have to do that.
I just wanted to confirm that I'm having the exact same problem, and the only way to resolve it is to add the user and password as mentioned just above. Always worked before KDE 4.7.
I've submitted a first patch and working on the correct fix.
I have the same problem, since update to kde-4.7 sftp does not work anymore. here is my log output: kio_sftp(5264) sftpProtocol::listDir: list directory: KUrl("sftp://root@myserver.com") kio_sftp(5264) sftpProtocol::openConnection: username= "root" , host= "myserver.com" , port= 22 kio_sftp(5264) sftpProtocol::openConnection: checking cache: info.username = "root" , info.url = "sftp://root@myserver.com:22" kio_sftp(5264) sftpProtocol::openConnection: Creating the SSH session and setting options Reading configuration data from /home/me/.ssh//config Reading configuration data from /etc/ssh/ssh_config [1] Unsupported option: ForwardX11Trusted, line: 32 [1] Unsupported option: SendEnv, line: 67 [1] Unsupported option: SendEnv, line: 68 [1] Unsupported option: SendEnv, line: 69 [1] Unsupported option: VisualHostKey, line: 73 [1] Unsupported option: HashKnownHosts, line: 77 kio_sftp(5264) sftpProtocol::openConnection: Trying to connect to the SSH server kio_sftp(5264) sftpProtocol::log_callback: [ 1 ] Trying to connect to host: myserver.com:22 with timeout 30000 ms kio_sftp(5264) sftpProtocol::log_callback: [ 1 ] SSH server banner: SSH-1.99-OpenSSH_4.4 kio_sftp(5264) sftpProtocol::log_callback: [ 1 ] Analyzing banner: SSH-1.99-OpenSSH_4.4 kio_sftp(5264) sftpProtocol::log_callback: [ 1 ] We are talking to an OpenSSH client version: 4.4 (40400) kio_sftp(5264) sftpProtocol::log_callback: [ 1 ] SSH_MSG_NEWKEYS sent kio_sftp(5264) sftpProtocol::log_callback: [ 1 ] Got SSH_MSG_NEWKEYS kio_sftp(5264) sftpProtocol::openConnection: Getting the SSH server hash kio_sftp(5264) sftpProtocol::openConnection: Checking if the SSH server is known kio_sftp(5264) sftpProtocol::openConnection: Trying to authenticate with the server kio_sftp(5264) sftpProtocol::openConnection: Trying to authenticate public key kio_sftp(5264) sftpProtocol::log_callback: [ 1 ] Trying to authenticate with SSH agent keys as user: root kio_sftp(5264) sftpProtocol::openConnection: Trying to authenticate with keyboard interactive kio_sftp(5264) sftpProtocol::authenticateKeyboardInteractive: Entering keyboard interactive function kio_sftp(5264) sftpProtocol::authenticateKeyboardInteractive: name= "" instruction= "" prompts 1 kio_sftp(5264) sftpProtocol::authenticateKeyboardInteractive: prompt= "Password: " echo= "0" kio_sftp(5264) sftpProtocol::openConnection: Trying to authenticate public key kio_sftp(5264) sftpProtocol::log_callback: [ 1 ] Trying to authenticate with SSH agent keys as user: root kio_sftp(5264) sftpProtocol::openConnection: Trying to authenticate with keyboard interactive kio_sftp(5264) sftpProtocol::authenticateKeyboardInteractive: Entering keyboard interactive function kio_sftp(5264) sftpProtocol::authenticateKeyboardInteractive: name= "" instruction= "" prompts 1 kio_sftp(5264) sftpProtocol::authenticateKeyboardInteractive: prompt= "Password: " echo= "0" kio_sftp(5264) sftpProtocol::openConnection: First attempt failed! Re-prompting user kio_sftp(5264) sftpProtocol::openConnection: User canceled, dlgResult = false kio_sftp(5264) sftpProtocol::closeConnection: closeConnection() kio_sftp(5264) sftpProtocol::requiresUserNameRedirection: Connected ? false Original: "root" Current: "root" kio_sftp(5264) sftpProtocol::canonicalizePath: Path to canonicalize: "." kio_sftp(5264) sftpProtocol::canonicalizePath: Could not canonicalize path: "." kio_sftp(5264)/kio (kioslave) KIO::SlaveBase::error: error() called twice! Please fix the KIO slave.
This patch should fix it. http://git.cryptomilk.org/users/asn/kde-runtime.git/commit/?h=kio_sftp_redirect_user
*** Bug 280253 has been marked as a duplicate of this bug. ***
This has been fixed upstream and backported to KDE 4.7. See http://commits.kde.org/kde-runtime/23e4ab03091e9d824e78171ea92a2da2326256d8
Hi again, I'm using kde 4.7.0 with the above kioslaves patch applied, and I'm still having the same problem. I'll see if I can get some debug information.
Created attachment 63297 [details] new kio_sftp log This is the new sftp log with libssh debug output
There are two patches needed to get this working correctly. So please test with KDE 4.7.1.
I can't get 4.7.1 easily right now. If you could point me to the other patch, that would be great. If not, I'll have to wait.
http://quickgit.kde.org/?p=kde-runtime.git&a=commit&h=21b15d57871dc1268cd74500b15bfa0e64148120
Created attachment 63410 [details] kio_sftp log after 2nd patch Thanks, I applied this patch too, and now I get a login dialog, but it still fails to login.
Could you please enable libssh loggin too? KIO_SFTP_LOG_VERBOSITY=3 kdeinit4
Created attachment 63415 [details] log with verbosity=3 I had ssh debug logging before but with verbosity=1
Could you try with KIO_SFTP_LOG_VERBOSITY=2 kdeinit4 too? Looks like something is wrong with logging.
Git commit 2a013593828c26d2cab6795f82e99bb5e247649c by Andreas Schneider. Committed on 06/09/2011 at 11:17. Pushed by anschneider into branch 'master'. kio_sftp: Call the password dialog for kbdint too. BUG: 278986 M +17 -17 kioslave/sftp/kio_sftp.cpp http://commits.kde.org/kde-runtime/2a013593828c26d2cab6795f82e99bb5e247649c
Git commit f014971cfb172883b6e7e16356a07d20b819dcdd by Andreas Schneider. Committed on 06/09/2011 at 11:19. Pushed by anschneider into branch 'master'. kio_sftp: Set the information we obtained from the dialog. We never set the password so we always fail. BUG: 278986 M +3 -0 kioslave/sftp/kio_sftp.cpp http://commits.kde.org/kde-runtime/f014971cfb172883b6e7e16356a07d20b819dcdd
Git commit c9442bd99a6943f3a0cfd686db71b15aaf279ca0 by Andreas Schneider. Committed on 06/09/2011 at 11:17. Pushed by anschneider into branch 'KDE/4.7'. kio_sftp: Call the password dialog for kbdint too. BUG: 278986 (cherry picked from commit 2a013593828c26d2cab6795f82e99bb5e247649c) M +17 -17 kioslave/sftp/kio_sftp.cpp http://commits.kde.org/kde-runtime/c9442bd99a6943f3a0cfd686db71b15aaf279ca0
Git commit 1e271597de95423d00b2c86cab6176ce2e719732 by Andreas Schneider. Committed on 06/09/2011 at 11:19. Pushed by anschneider into branch 'KDE/4.7'. kio_sftp: Set the information we obtained from the dialog. We never set the password so we always fail. BUG: 278986 (cherry picked from commit f014971cfb172883b6e7e16356a07d20b819dcdd) M +3 -0 kioslave/sftp/kio_sftp.cpp http://commits.kde.org/kde-runtime/1e271597de95423d00b2c86cab6176ce2e719732
This should fix it.
aditsu: Can you confirm this?
Hi, sorry, I've been quite busy and had some hardware problems too. I'd like to confirm, but it seems that there are way too many patches to keep track of. And I'm still on 4.7.0. I wonder if you could provide a single unified diff of the relevant files that were modified between 4.7.0 and current head (or at least since 4.7.1), that would help a lot. And on the other hand, I wonder why you apparently didn't find the exact same problems while testing.
Git commit 64449a504e6f2e87c52c99d7daf8a2145ad11ab2 by Marco Martin, on behalf of Andreas Schneider. Committed on 06/09/2011 at 11:17. Pushed by mart into branch 'active-development/4.7'. kio_sftp: Call the password dialog for kbdint too. BUG: 278986 (cherry picked from commit 2a013593828c26d2cab6795f82e99bb5e247649c) M +17 -17 kioslave/sftp/kio_sftp.cpp http://commits.kde.org/kde-runtime/64449a504e6f2e87c52c99d7daf8a2145ad11ab2
Git commit c87240940667d43b72152f9f95e4611dba48c7ca by Marco Martin, on behalf of Andreas Schneider. Committed on 06/09/2011 at 11:19. Pushed by mart into branch 'active-development/4.7'. kio_sftp: Set the information we obtained from the dialog. We never set the password so we always fail. BUG: 278986 (cherry picked from commit f014971cfb172883b6e7e16356a07d20b819dcdd) M +3 -0 kioslave/sftp/kio_sftp.cpp http://commits.kde.org/kde-runtime/c87240940667d43b72152f9f95e4611dba48c7ca
Hi again, I finally managed to test the latest code. I'm running kde 4.7.1 now and I got the latest kio_sftp.cpp from https://projects.kde.org/projects/kde/kde-runtime/repository/changes/kioslave/sftp/kio_sftp.cpp and made a diff against the 4.7.1 version, and reinstalled the kioslaves using this patch. The result: sftp is now working in dolphin. Thanks!
Thanks for testing. 4.7.2 will be released next Tuesday!
I can sftp://foo.bar.com but it says authentication failed when I try sftp://otheruser@foo.bar.com Using ssh to go to otheruser@foo.bar.com works fine from command line. so.... regressed bug? DOLPHIN 15.04.0 / KDE 4.14.9