SSH public key authentication: Difference between revisions

Pigs (talk | contribs)
Refactored and cleaned up page, added opening
Phobos (talk | contribs)
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 53: Line 53:


<syntaxhighlight lang="console">
<syntaxhighlight lang="console">
$ ssh-add .ssh/id_rsa
$ ssh-add ~/.ssh/id_rsa
Enter passphrase for .ssh/id_rsa:  
Enter passphrase for /home/user/.ssh/id_rsa:  
Identity added: .ssh/id_rsa (myaccounts@mymachine)
Identity added: /home/user/.ssh/id_rsa (myaccounts@mymachine)
</syntaxhighlight>
</syntaxhighlight>


Line 62: Line 62:
== SSH server configuration ==
== SSH server configuration ==


You can manage SSH authorized public keys declaratively by adding them to your system to your system configuration:
You can manage SSH authorized public keys declaratively by adding them to your system configuration:


{{file|/etc/nixos/configuration.nix|nix|
{{file|/etc/nixos/configuration.nix|nix|