SUMMARY This doesn't work for sftp and fish when execute via dolphin add network (or dophin command bar). It DOES work straight from the command line STEPS TO REPRODUCE 1 I have an ssh agent running with following in .bashrc (as per arch wiki). # pass ssh-agent to kdewallet export SSH_ASKPASS='/usr/bin/ksshaskpass' # start ssh agent if not running if ! pgrep -u "$USER" ssh-agent > /dev/null; then ssh-agent > "$XDG_RUNTIME_DIR/ssh-agent.env" fi if [[ ! "$SSH_AUTH_SOCK" ]]; then source "$XDG_RUNTIME_DIR/ssh-agent.env" >/dev/null fi 2 I am using kdewallet to store the passphrase. ssh-add -q ~/Keys/AWS/aws.pem </dev/null If done for the first time it will popup and ask for the passphrase and if save is selected it will store in kde wallet. 3 If I connect from command line with ssh xxx@xxx.xx.xx.xx it works if I connect from command line with sftp xxx@xxx.xx.xx.xx it works OBSERVED RESULT When I try to add a network folder in the wizard or directly in the bar, I get the message: Unable to connect to server. Please check your settings and try again. It doesn't work for sftp and fish EXPECTED RESULT I should be able to connect as I can do through the command line. SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: Arch (available in About System) KDE Plasma Version:5.19.5 KDE Frameworks Version: 5.74 Qt Version: 5.15.1 ADDITIONAL INFORMATION
Can you elaborate on your intended ssh-agent involvement here? Your .bashrc is irrelevant unless you start your entire desktop session from a bash as that entire sourcing dancing will do nothing. Bash is not involved in starting up a desktop session.
And please provide a debug log with libssh output https://community.kde.org/Guidelines_and_HOWTOs/Debugging/Debugging_IOSlaves/Debugging_kio_sftp#Logging_with_libssh_debug_output
Harald, Yea I guess I gave a bit too much detail (-: In brief, I have an ssh-agent running, added a key, using the kde-wallet to store the passphrase (via SSH_ASKPASS) and it is working from command line with ssh and sftp. It does not work via dolphin, does this not use the ssh-agent? I will try to get the libssh output. Hans
Hi, Even stranger: When executing as per suggested website it connects and works!!! KIO_SFTP_LOG_VERBOSITY=10 KDE_FORK_SLAVES=1 QT_LOGGING_RULES="log_kio_sftp=true;" dolphin --new-window sftp://xx@xx.xx.xxx.xxx BUT when doing the following, I am getting authentication error! dolphin --new-window sftp://xx@xx.xx.xxx.xxx
When doing: dolphin --new-window sftp://xx@xx.xx.xxx.xxx It opens window with authentication error and on the command line it says kf.kio.core: Protocol Class of url QUrl("sftp://xx@xx.xx.xxx.xxx") , isn't ':local', cancelling job.
I'm 99% certain this is a setup problem. The reason > KIO_SFTP_LOG_VERBOSITY=10 KDE_FORK_SLAVES=1 QT_LOGGING_RULES="log_kio_sftp=true;" dolphin --new-window sftp://xx@xx.xx.xxx.xxx works is because of KDE_FORK_SLAVES=1 which forces the underlying communication with libssh to start from dolphin directly (thus inheriting the environment which you set via bashrc) > dolphin --new-window sftp://xx@xx.xx.xxx.xxx doesn't work because the forking happens from a different process that is started early on in the startup of plasma and as I've mentioned bashrc doesn't play into that. Simply put: part of your session doesn't have the env set up correctly because you rely on bashrc but plasma isn't written in bash so it doesn't care what you put there. You could try putting the ssh-agent stuff into a plasma env script [1] or an Xsession.d script. In any event I encourage you to take this to a support forum to get help on setting up ssh-agent properly for a plasma session. [1] https://userbase.kde.org/Session_Environment_Variables/en