Ssh-askpass not found

Hi,

I have an app that uses ssh to connect to a server and it gets the password using a pop-up window implemented by ssh-askpass-gnome. The problem I have is that it is not opening the dialog when it is packed as snap. I noticed that there is a symlink in my root /usr/bin/ssh-askpass pointing to ssh-askpass-gnome. But this is missing in my snap’s file system. Unless there is another solution, I would like to know how can I create this symlink as part of the snap installation.

I have tried using hook (install), but it fails saying that the folder is read-only ($SNAP/usr/bin). I have tried setting an environment variable SSH_ASKPASS pointing to ssh-askpass-gnome, but it doesn’t work either.

Any clue here? I’m using Qt5 and I have added kde-neon extension for core18.

A snap is expected to bundle nearly everything required to run it, in this instance I’d imagine you’d need to include ssh-askpass-gnome in your stage packages in order for it to run. It isn’t expected it can just use this if it happens to exist on the system.

If you have bundled it and the problem legitimately comes down to you need to manipulate the snaps internal /usr/bin/ssh-askpass, you can make use of layouts, by adding something like this:

layout:
  /usr/bin/ssh-askpass:
    symlink: $SNAP/bin/ssh-askpass-gnome

(You’ll probably need to correct the symlink path)

1 Like

Thanks James. This looks promising. Yes the ssh-askpass-gnome is part of the stage packages.