SSH public key authentication: Difference between revisions

KDE: Plasma is already configured to use ksshaskpass (https://github.com/NixOS/nixpkgs/blob/a00e7672cde5eb31142afcebe54978fa153d6ad0/nixos/modules/services/desktop-managers/plasma6.nix#L259) so we don't need to do it manually
Tags: Mobile edit Mobile web edit
Line 96: Line 96:
   startAgent = true;
   startAgent = true;
   enableAskPassword = true;
   enableAskPassword = true;
  askPassword = pkgs.lib.mkForce "${pkgs.ksshaskpass.out}/bin/ksshaskpass";
};
};


Line 103: Line 102:
};
};
</syntaxhighlight>
</syntaxhighlight>
{{Note | It is also possible to add {{ic|SSH_ASKPASS}} to your environment variables, but you will likely encounter complaints when running {{ic|nixos-rebuild}}. You can add {{ic|lib.mkForce}} to {{ic|SSH_ASKPASS}} to circumvent the error, like this:<br />{{ic|1=SSH_ASKPASS = lib.mkForce "${pkgs.ksshaskpass.out}/bin/ksshaskpass";}}.
}}


After applying these changes, either log out (if you used <code>switch</code>) or reboot (if you used <code>boot</code> for the variables to take effect.
After applying these changes, either log out (if you used <code>switch</code>) or reboot (if you used <code>boot</code> for the variables to take effect.