Suppressing GUI popup for SSH password in Ubuntu 26.04

Since Ubuntu 26.04 KDE Plasma uses ksshaskpass to get passwords for ssh in terminal.

I am using Kubuntu on all my desktop machines and laptops. The recent update to Kubuntu 26.04 - and as well Ubuntu 26.04 of course - updated kubuntu-settings-desktop to version 1:26.13.

This package provides a bunch of configuration files for the desktop. At /etc/xdg/plasma-workspace/env/, a directory that is read for the whole system when Plasma starts up, the package places a shell script named ksshaskpass.sh Within that scipt the variable SSH_ASKPASS is set to /usr/bin/ksshaskpass, a little helper program, that pops a widget to ask for the ssh password. What is new in 26.04 is that now the variable SSH_ASKPASS_REQUIRE, previously not set at all, is set to the value prefer.

The latter setting causes ssh, as you can read in ssh’s man page, to use the program set in SSH_ASKPASS, i.e. ksshaskpass, to ask for a password and not promt for the password in the terminal.

If you want to revert that behaviour, you can copy the ksshaskpass.sh scipt to ~/.config/plasma-workspace/env/ and unset SSH_ASKPASS_REQUIRE. When starting up Plasma the next time, ssh should prompt for passwords in the shell again.

One note here before you change your settings: ksshaskpass is able to remember your password, if you check the “remember” checkbox. If you do that, you don’t need to enter the password the next time you ssh into the same machine. In the end that might be a feature that makes you keept the prefer-setting.