Announcement

Collapse
No announcement yet.

SSH broken .. again

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

    [Post-Install] SSH broken .. again

    When I first upgraded to 26.04 my ssh broke. I could no longer push repos to github.

    I got the error:
    Code:
    git@github.com: Permission denied (publickey).
    fatal: Could not read from remote repository.​
    I fixed it by running
    Code:
    ssh add
    And today, out of the blue the problem reoccurs. This time ssh add fails with the error

    Code:
    ssh: Could not resolve hostname add: Temporary failure in name resolution
    DNS seems to be working okay.

    Code:
    nslookup google.com
    Server:        127.0.0.53
    Address:    127.0.0.53#53
    
    Non-authoritative answer:
    Name:    google.com
    Address: 142.251.45.174
    ​
    Any ideas?

    Man I wish I had waited a lot longer to upgrade to 26.04...

    #2
    That would be ssh-add.

    ssh add here is reading add as the location, hostname, etc. so the error message is actually accurate, but of course no necessarily clear.

    Self-built: Asus PRIME B550M-K/Ryzen 5600GT/32Gb/Intel ARC B580 12Gb/KDE neon
    HP Elitedesk 800 G3 Mini: i5-7500T(35w)/32Gb/Kubuntu LTS
    HP Chromebook 14: i5-1135G7/8Gb/512Gb SSD/KDE Linux​

    Comment


      #3
      The correct and official command to manage your private keys in the authentication agent is ssh-add. There is no command named ssh add (with a space) in standard OpenSSH utilities. [1]
      However, in Kubuntu 26.04, managing your SSH keys with the KDE Plasma desktop involves specific behaviors depending on whether you are using the terminal or trying to automate key unlocking at login.
      1. Basic Terminal Usage
      To add a key to your running agent manually from the terminal, use the hyphenated command:
      bashssh-add ~/.ssh/id_ed25519

      Use code with caution.
      2. Integration with KWallet & Automatic Loading
      Instead of running ssh-add manually every session, you can configure Kubuntu's built-in ksshaskpass to securely retrieve your passphrase from KWallet. [1, 2]
      • The Modern Way (Systemd Environment):
        In modern releases like Kubuntu 26.04, the systemd user instance automatically provisions a background ssh-agent (/usr/lib/systemd/user/ssh-agent.socket). [1]
      • Seamless Automation:
        You can instruct SSH to automatically pass keys to this agent when you use them by adding the following snippet to your user configuration:Edit or create ~/.ssh/config and add:
        textHost *
        AddKeysToAgent yes

        Use code with caution.
        With this setting, the first time you use an SSH key in a session, you will be prompted for your passphrase via a KDE graphical prompt (ksshaskpass). Once entered and saved to KWallet, you won't have to enter it again for subsequent connections. [1, 2]
      Troubleshooting standard ssh-agent in 26.04
      If you find that your manual ssh-add command complains about a missing agent (Could not open a connection to your authentication agent), ensure your active shell knows where the systemd-managed agent socket is: [1]
      bashexport SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"

      Use code with caution.
      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

      Users Viewing This Topic

      Collapse

      There are 0 users viewing this topic.

      Working...
      X