Fix SSH known hosts handling
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -9,15 +9,12 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
|
environment.persistence."/persist"."${home}/.ssh/known_hosts" = { };
|
||||||
|
|
||||||
home-manager.users.${user} = {
|
home-manager.users.${user} = {
|
||||||
programs.ssh = {
|
programs.ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
addKeysToAgent = "yes";
|
addKeysToAgent = "yes";
|
||||||
userKnownHostsFile = lib.strings.concatStringsSep " " [
|
|
||||||
../../../../../installer/secrets/ssh_host_ed25519_key.pub
|
|
||||||
../../../../../eirene/secrets/ssh_host_ed25519_key.pub
|
|
||||||
../../../../../elara/secrets/ssh_host_ed25519_key.pub
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services.ssh-agent.enable = true;
|
services.ssh-agent.enable = true;
|
||||||
|
@@ -21,10 +21,6 @@
|
|||||||
hostname = "github.com";
|
hostname = "github.com";
|
||||||
user = "git";
|
user = "git";
|
||||||
identityFile = "${home}/.ssh/ssh_personal_ed25519_key";
|
identityFile = "${home}/.ssh/ssh_personal_ed25519_key";
|
||||||
extraOptions = {
|
|
||||||
StrictHostKeyChecking = "no";
|
|
||||||
UserKnownHostsFile = "/dev/null";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@@ -11,12 +11,10 @@
|
|||||||
User git
|
User git
|
||||||
HostName github.com
|
HostName github.com
|
||||||
IdentityFile /root/.ssh/ssh_sas_ed25519_key
|
IdentityFile /root/.ssh/ssh_sas_ed25519_key
|
||||||
StrictHostKeyChecking no
|
|
||||||
|
|
||||||
Host gitlab.sas.com
|
Host gitlab.sas.com
|
||||||
User git
|
User git
|
||||||
HostName gitlab.sas.com
|
HostName gitlab.sas.com
|
||||||
IdentityFile /root/.ssh/ssh_sas_ed25519_key
|
IdentityFile /root/.ssh/ssh_sas_ed25519_key
|
||||||
StrictHostKeyChecking no
|
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
@@ -25,20 +25,12 @@
|
|||||||
"${home}/.ssh/ssh_sas_ed25519_key"
|
"${home}/.ssh/ssh_sas_ed25519_key"
|
||||||
"${home}/.ssh/ssh_personal_ed25519_key"
|
"${home}/.ssh/ssh_personal_ed25519_key"
|
||||||
];
|
];
|
||||||
extraOptions = {
|
|
||||||
StrictHostKeyChecking = "no";
|
|
||||||
UserKnownHostsFile = "/dev/null";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
"gitlab.sas.com" = {
|
"gitlab.sas.com" = {
|
||||||
hostname = "gitlab.sas.com";
|
hostname = "gitlab.sas.com";
|
||||||
user = "git";
|
user = "git";
|
||||||
identityFile = "${home}/.ssh/ssh_sas_ed25519_key";
|
identityFile = "${home}/.ssh/ssh_sas_ed25519_key";
|
||||||
extraOptions = {
|
|
||||||
StrictHostKeyChecking = "no";
|
|
||||||
UserKnownHostsFile = "/dev/null";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
"gerrit-svi.unx.sas.com" = {
|
"gerrit-svi.unx.sas.com" = {
|
||||||
@@ -46,10 +38,6 @@
|
|||||||
user = "nikara";
|
user = "nikara";
|
||||||
port = 29418;
|
port = 29418;
|
||||||
identityFile = "${home}/.ssh/ssh_sas_ed25519_key";
|
identityFile = "${home}/.ssh/ssh_sas_ed25519_key";
|
||||||
extraOptions = {
|
|
||||||
StrictHostKeyChecking = "no";
|
|
||||||
UserKnownHostsFile = "/dev/null";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@@ -9,10 +9,6 @@
|
|||||||
inherit user;
|
inherit user;
|
||||||
hostname = "cldlgn.fyi.sas.com";
|
hostname = "cldlgn.fyi.sas.com";
|
||||||
identityFile = "${home}/.ssh/ssh_sas_ed25519_key";
|
identityFile = "${home}/.ssh/ssh_sas_ed25519_key";
|
||||||
extraOptions = {
|
|
||||||
StrictHostKeyChecking = "no";
|
|
||||||
UserKnownHostsFile = "/dev/null";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@@ -22,10 +22,6 @@
|
|||||||
hostname = "github.com";
|
hostname = "github.com";
|
||||||
user = "git";
|
user = "git";
|
||||||
identityFile = "${home}/.ssh/ssh_personal_ed25519_key";
|
identityFile = "${home}/.ssh/ssh_personal_ed25519_key";
|
||||||
extraOptions = {
|
|
||||||
StrictHostKeyChecking = "no";
|
|
||||||
UserKnownHostsFile = "/dev/null";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user