feat(ssh): add phone key
This commit is contained in:
parent
e02cd6b8b3
commit
f195747b77
1 changed files with 11 additions and 2 deletions
|
|
@ -3,7 +3,8 @@
|
||||||
let
|
let
|
||||||
cfg = config.systemModules.networking;
|
cfg = config.systemModules.networking;
|
||||||
key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBn3ff3HaZHIyH4K13k8Mwqu/o7jIABJ8rANK+r2PfJk";
|
key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBn3ff3HaZHIyH4K13k8Mwqu/o7jIABJ8rANK+r2PfJk";
|
||||||
inherit (lib) mkIf mkEnableOption;
|
phoneKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINredx07UAk2l1wUPujYnmJci1+XEmcUuSX0DIYg6Vzz";
|
||||||
|
inherit (lib) mkIf mkDefault mkEnableOption;
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
@ -17,10 +18,18 @@ in
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
UseDns = true;
|
UseDns = false;
|
||||||
PasswordAuthentication = false;
|
PasswordAuthentication = false;
|
||||||
|
AuthenticationMethods = "publickey";
|
||||||
|
UsePam = "no";
|
||||||
PermitRootLogin = "no";
|
PermitRootLogin = "no";
|
||||||
StreamLocalBindUnlink = "yes";
|
StreamLocalBindUnlink = "yes";
|
||||||
|
KbdInteractiveAuthentication = mkDefault false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
programs.ssh = {
|
||||||
|
knownHosts = {
|
||||||
|
"192.168.1.36".publicKey = phoneKey;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue