Announcement

Collapse
No announcement yet.

26.04 LTS (How) Can I Get OpenSsh Client to Work In a Terminal Window?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    26.04 LTS (How) Can I Get OpenSsh Client to Work In a Terminal Window?

    I've been trying to use ssh to access remote servers. On any other system, I'd type "ssh foo@bar.baz.org" in the shell, and things would basically just work.

    On Kubuntu, I got a pop-up window asking for my password. The shell window told me something called ksshaskpass was involved.

    I asked on kde forums, and was told that it was safe to uninstall ksshaskpass.

    I did so. I then rebooted, and tried again.

    I then got responses in the shell like

    Code:
    ssh_askpass: exec(/usr/bin/ksshaskpass): No such file or directory
    ​I traced this to environment variables SSH_ASKPASS and SSH_ASKPASS_REQUIRE in my shell.

    I traced those to /etc/xdg/plasma-workspace/env/ksshaskpass.sh

    ​I traced *that* to the kbuntu-settings-desktop package (.deb).

    That package makes the openssh client non-functional unless you have the ksshaskpass package, but presumably doesn't declare the dependency.

    I fear that uninstalling kubuntu-settings-desktop would cause major breakage elsewhere in the desktop.


    So my question: Is it even possible, on kubuntu, to use the openssh client from a shell window, with all prompts answered in that shell window, and no involvement of any external password safe or similar?

    If so, how do I do it?

    In particular, how do I do it in a manner that will survive upgrading to the next LTS release, and then the LTS after that, not to mention installing new versions of packages in the meanwhile?

    Thanks for any enlightenment.
    Last edited by DinoNerd; Yesterday, 11:11 PM.

    #2
    I can only say that on my K 26.04, I use ssh in Konsole all the time to reach our (KFN's) server. No problems. I have ksshaskpass installed, although I've never done anything with it. openssh-client is also installed, and again, I've never done anything with it.
    Slava Ukraini! 🇺🇦
    Windows no longer obstruct my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes​

    Comment


      #3
      Originally posted by Snowhog View Post
      I can only say that on my K 26.04, I use ssh in Konsole all the time to reach our (KFN's) server. No problems. I have ksshaskpass installed, although I've never done anything with it. openssh-client is also installed, and again, I've never done anything with it.
      Weird. I don't recall doing anything to it myself either. I did install openssh-server, but that shouldn't have had any effect here.

      One thing though: My system was first installed as the non-LTS immediately before 26.04, then upgraded. I've known upgrades to "fix" things in bad ways, but usually that takes many updates in a row.

      One other thing: there are breadcrumbs on the net that if you set various environment variables in your shell, you can get openssh to not use kssshaskpass even though it's present. I haven't pursued that; I'd have to reinstall ksshaskpass and then probably experiment a lot. Have you done something like this?

      Comment


        #4
        Originally posted by DinoNerd View Post
        I've been trying to use ssh to access remote servers. On any other system, I'd type "ssh foo@bar.baz.org" in the shell, and things would basically just work.

        On Kubuntu, I got a pop-up window asking for my password. The shell window told me something called ksshaskpass was involved.

        I asked on kde forums, and was told that it was safe to uninstall ksshaskpass.

        I did so. I then rebooted, and tried again.

        I then got responses in the shell like

        Code:
        ssh_askpass: exec(/usr/bin/ksshaskpass): No such file or directory
        ​I traced this to environment variables SSH_ASKPASS and SSH_ASKPASS_REQUIRE in my shell.

        I traced those to /etc/xdg/plasma-workspace/env/ksshaskpass.sh ...
        That script sets SSH_ASKPASS_REQUIRE=prefer, which tells ssh to use the graphical helper even when it runs in a terminal. You don't need to touch the package: putting unset SSH_ASKPASS_REQUIRE (or export SSH_ASKPASS_REQUIRE=never) in your ~/.bashrc brings back the normal password prompt in Konsole. Reinstalling ksshaskpass and keeping that line is probably the tidiest fix, because ssh-add started from the desktop session can still find the helper.

        Comment

        Users Viewing This Topic

        Collapse

        There are 0 users viewing this topic.

        Working...
        X