Using SFTP with SSH-Agent in Dolphin

Hey there.

I’m trying to SFTP into a really old device (A jailbroken kindle in this case). For security reasons, I do not keep my keys in the ~/.ssh/ folder, and instead store them in my KeePassXC database and load them in using ssh-agent. This workflow works flawlessly, and I can ssh into the kindle with my public key.

┌─[soham@wwind:~]
└─╼ sftp root@192.168.68.106 -v  # I have not loaded the key here
root@192.168.68.106: Permission denied (publickey).
Connection closed.  
Connection closed
┌─[soham@wwind:~]
└─╼ sftp root@192.168.68.106 -v  # I have loaded the key here
Connected to 192.168.68.106.
sftp> exit

However, in Dolphin, it reports “Authentication Error” regardless of whether my key is in the agent or not. Additionally, saving the key as id_ed25519 in ~/.ssh/ makes it work all of a sudden, but again, due to security reasons, I cannot store the private key on the disk like this.

I would have expected this to work without any error because ssh-agent is pretty invisible. Is there additional configuration required to get Dolphin to accept a key from the agent?

Has the ssh-agent been loaded by the time the Plasma session starts?

Differences in the behavior on an interactive shell and of the desktop shell can often been tracked down to difference in environment.

For example bash reads different configuration files depending on whether it is the login shell or an interactive shell.