Guidelines and HOWTOs/Debugging/Debugging IOSlaves/Debugging kio sftp: Difference between revisions

From KDE Community Wiki
m (5 revisions imported)
No edit summary
Line 3: Line 3:
= Overview =
= Overview =


When you point file manager to sftp://''user''@''target'', [http://websvn.kde.org/trunk/KDE/kdebase/runtime/kioslave/sftp/kio_sftp.cpp?view=log the sftp kioslave] uses [http://www.libssh.org libssh] to open a connection to the sftp server.
When you point file manager to sftp://''user''@''target'', the sftp KIO slave uses [http://www.libssh.org libssh] to open a connection to the sftp server.


= Reporting Bugs =
= Reporting Bugs =
Line 13: Line 13:
Then got to http://bugs.kde.org/ and create a bug report. Tell us:
Then got to http://bugs.kde.org/ and create a bug report. Tell us:


* The KDE you're running
* The KDE Frameworks and Dolphin version you're running
* The libssh version installed
* The libssh version installed
* The sftp server version (e.g. the openssh version on the server)
* The sftp server version (e.g. the openssh version on the server)
Line 21: Line 21:
= Logging =
= Logging =


You may want to switch on logging for kio_sftp.
{{Input|1=<nowiki>
 
KDE_FORK_SLAVES=1 dolphin --new-window
In this example, we want to log the output to /tmp/kio_sftp.log. Open a konsole or run the command 'kdebugdialog --fullmode'.
</nowiki>}}
 
In the "Debug Area" select "7120 kio_sftp". In the Information box select 'Information' as the "Output" and use '/tmp/kio_sftp.log' a the "File".
 
To enable logging you have to reload the slave system. You can do this by calling:
 
'kdeinit4'


= Logging with libssh debug output =
= Logging with libssh debug output =


To enable libssh debug messages in addition you have to set an environment variable before calling kdeinit.
To enable libssh debug messages in addition you have to set an additional environment variable:


KIO_SFTP_LOG_VERBOSITY=1 kdeinit4
{{Input|1=<nowiki>
KIO_SFTP_LOG_VERBOSITY=1 KDE_FORK_SLAVES=1 dolphin --new-window YOUR_SFTP_URL
</nowiki>}}


= Enable logging in openssh =
= Enable logging in openssh =
Line 47: Line 43:
Look for LogLevel and set it to:
Look for LogLevel and set it to:


{{Input|1=<nowiki>
   LogLevel DEBUG
   LogLevel DEBUG
</nowiki>}}


== SFTP Logging ==
== SFTP Logging ==
Line 53: Line 51:
Edit /etc/ssh/sshd_config
Edit /etc/ssh/sshd_config


Look for the sftp subsystem and change it to:
Look for the sftp subsystem and appned <code>-l DEBUG</code> it to:


{{Input|1=<nowiki>
   Subsystem sftp /usr/lib64/ssh/sftp-server -l DEBUG
   Subsystem sftp /usr/lib64/ssh/sftp-server -l DEBUG
</nowiki>}}

Revision as of 12:10, 13 May 2020

This page is a starting point for debugging kio_sftp. Please also read how to debug IO slaves generically.

Overview

When you point file manager to sftp://user@target, the sftp KIO slave uses libssh to open a connection to the sftp server.

Reporting Bugs

If this is your first bug report please read the following document:

How to Report Bugs Effectively

Then got to http://bugs.kde.org/ and create a bug report. Tell us:

  • The KDE Frameworks and Dolphin version you're running
  • The libssh version installed
  • The sftp server version (e.g. the openssh version on the server)
  • If you use ~/.ssh/config show us your special host config
  • Provide log files if possible (see below)

Logging

KDE_FORK_SLAVES=1 dolphin --new-window

Logging with libssh debug output

To enable libssh debug messages in addition you have to set an additional environment variable:

KIO_SFTP_LOG_VERBOSITY=1  KDE_FORK_SLAVES=1 dolphin --new-window YOUR_SFTP_URL

Enable logging in openssh

(Both of the instructions below refer to sshd, the server--these should not affect client operations, e.g. running ssh or sftp. I don't think these instructions are correct.)

SSH Logging

Edit /etc/ssh/sshd_config

Look for LogLevel and set it to:

  LogLevel DEBUG

SFTP Logging

Edit /etc/ssh/sshd_config

Look for the sftp subsystem and appned -l DEBUG it to:

  Subsystem sftp /usr/lib64/ssh/sftp-server -l DEBUG