This forum has been archived. All content is frozen. Please use KDE Discuss instead.

sftp kio does not work

Tags: None
(comma "," separated)
User avatar
atrox
Registered Member
Posts
211
Karma
0
OS

sftp kio does not work

Sat Feb 12, 2011 1:23 pm
I'm not sure why this happens, but when I try to connect to my server (which is behind a firewall and thus SSH port is redirected in through non-standard port).

I can connect my server through ssh, but when I try to connect there with fish:// or sftp:// it does not work - fish will just stay waiting for something and sftp will give an error: "The host key for this server was not found, but another type of key exists. An attacker might change the default server key to confuse your client into thinking the key does not exist. Please contact your system administrator." (that's in Konqueror.. Dolphin gives mangled sentences of errors).

If I try to reach a firewall-server through port 22, it works OK, also if I try to reach my server through another firewall with another address, it works OK too.

I've deleted every entry in .ssh/known_hosts related to the address or IP, but it does not help anyhow. Where does sftp KIO store its SSH keys?
User avatar
atrox
Registered Member
Posts
211
Karma
0
OS

Re: sftp kio does not work

Sat Feb 12, 2011 1:24 pm
Ah yes.. I use KDE 4.6.0 on openSUSE 11.3 currently :)
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: sftp kio does not work

Sat Feb 12, 2011 10:27 pm
On my system (running trunk) this seems to work correctly (tested with port 443)

sftp://username@host:port/


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
atrox
Registered Member
Posts
211
Karma
0
OS

Re: sftp kio does not work

Sat Feb 12, 2011 11:17 pm
Well.. I was not saying it's a global bug or smth. What could I check to see what's wrong in my system?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: sftp kio does not work

Sun Feb 13, 2011 6:04 am
Try turning the appropriate debugging zones on using kdebugdialog and monitoring ~/.xsession-errors


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
atrox
Registered Member
Posts
211
Karma
0
OS

Re: sftp kio does not work

Sun Feb 13, 2011 9:42 am
Um...
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: sftp kio does not work

Mon Feb 14, 2011 12:06 am
As further explanation, use KRunner to run "kdebugdialog". Uncheck "Disable all debug output if needed, then press "Select All" and confirm.

Then use "tail -f ~/.xsession-errors" in Konsole to monitor changes to the file that occur when you are trying to connect to your SSH server.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
joelthelion
Registered Member
Posts
3
Karma
0
OS

Re: sftp kio does not work

Sat Apr 16, 2011 7:39 pm
I have the same problem, with the same error message. I tried kdebugdialog and monitoring .xsession-errors, but there was nothing that seemed interesting. Any ideas?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: sftp kio does not work

Sun Apr 17, 2011 8:10 am
Please make sure that a public key version of your key is available for use by libssh.
Example: ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub must both exist for sftp:// to be able to use the key.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
cleary
Registered Member
Posts
32
Karma
0

Re: sftp kio does not work

Wed May 25, 2011 1:08 am
bcooksley wrote:Please make sure that a public key version of your key is available for use by libssh.
Example: ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub must both exist for sftp:// to be able to use the key.


I'm also experiencing this issue:
the keys I'm using are id_dsa[.pub], not rsa.
This issue appeared after I configured my server to accept key authentication from my client.

I'm guessing the problem is that either kio doesn't support the use of dsa keys, or it can't handle a change in key type.

As per the OPs first post -
I've deleted every entry in .ssh/known_hosts related to the address or IP, but it does not help anyhow. Where does sftp KIO store its SSH keys?


Can anyone answer that?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: sftp kio does not work

Wed May 25, 2011 5:24 am
I myself use a dsa key, and it works fine. Please ensure that both the private and public portions are present, and accessible by your user. Also, try adding your key to a SSH agent.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
cleary
Registered Member
Posts
32
Karma
0

Re: sftp kio does not work

Wed May 25, 2011 5:37 am
bcooksley wrote:I myself use a dsa key, and it works fine. Please ensure that both the private and public portions are present, and accessible by your user. Also, try adding your key to a SSH agent.


I can confirm both -
Code: Select all
-rw------- 1 cleary cleary  751 May 20 01:26 id_dsa
-rw-r--r-- 1 cleary cleary  599 May 20 01:26 id_dsa.pub

$ ssh-add -l
1024 d8:39:98:XX:05:XX:ac:XX:1c:XX:26:XX:c3:XX:d0:XX /home/cleary/.ssh/id_dsa (DSA)


Things that changed between it working and not working:
* added key authentication, where previously I would login with user/pass
* server was rebuilt (host key changed)

So the problem seems to me to be that kio is caching the hosts public credentials *somewhere* but I can't work out where. Copious find-ing and grepping in ~/.kde hasn't turned up anything useful.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: sftp kio does not work

Wed May 25, 2011 5:39 am
To confirm that theory, can you try under a new user please?
I would suspect that KIO should use the SSH standard known hosts file in ~/.ssh/known_hosts.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
cleary
Registered Member
Posts
32
Karma
0

Re: sftp kio does not work

Wed May 25, 2011 6:02 am
Created a new user with adduser
New kde profile generated on login
ssh from cli worked
sftp in dolphin failed with this error:

Image

I'm wondering if I'm just missing a package providing dsa support in kio (running up-to-date debian sid, kde 4.6.2 from the kde maintainers experimental snapshots repo)?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: sftp kio does not work

Wed May 25, 2011 6:22 am
As far as I am aware, the same code is used for dsa and rsa support in the sftp KIO slave. If you have an empty ~/.ssh/known_hosts, does it prompt you to add the host or decline it?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]