[nixbox] SSH updates.

This commit is contained in:
jmug
2026-03-04 15:43:12 -08:00
parent fe1c287242
commit 96bc9b8b01
2 changed files with 24 additions and 24 deletions
-2
View File
@@ -241,11 +241,9 @@ in
services.gvfs.enable = true; services.gvfs.enable = true;
services.udisks2.enable = true; services.udisks2.enable = true;
# Enable the OpenSSH daemon.
# Enable the OpenSSH daemon. # Enable the OpenSSH daemon.
services.openssh = { services.openssh = {
enable = true; enable = true;
# ports = [ 69 ];
settings = { settings = {
PasswordAuthentication = false; PasswordAuthentication = false;
PermitRootLogin = "no"; PermitRootLogin = "no";
+24 -22
View File
@@ -147,42 +147,44 @@ in {
enable = true; enable = true;
enableDefaultConfig = false; enableDefaultConfig = false;
matchBlocks = { matchBlocks = {
"git" = { "*" = {
forwardAgent = false;
addKeysToAgent = "no";
compression = false;
serverAliveInterval = 0;
serverAliveCountMax = 3;
hashKnownHosts = false;
userKnownHostsFile = "~/.ssh/known_hosts";
controlMaster = "no";
controlPath = "~/.ssh/master-%r@%n:%p";
controlPersist = "no";
identityFile = [
"/home/jmug/.ssh/id_yubikey" # Auto updated symlik that matches all yubikeys.
"/home/jmug/.ssh/id_jmug" # Fallback key with passphrase.
];
};
git = {
host = "github.com"; host = "github.com";
user = "git"; user = "git";
identityFile = [
"/home/jmug/.ssh/id_yubikey" # Auto updated symlik that matches all yubikeys.
"/home/jmug/.ssh/id_jmug" # Fallback key with passphrase.
];
addKeysToAgent = "yes"; addKeysToAgent = "yes";
}; };
"forgejo" = { forgejo = {
host = "code.jmug.me"; host = "code.jmug.me";
user = "forgejo"; user = "forgejo";
identityFile = [
"/home/jmug/.ssh/id_yubikey" # Auto updated symlik that matches all yubikeys.
"/home/jmug/.ssh/id_jmug" # Fallback key with passphrase.
];
addKeysToAgent = "yes"; addKeysToAgent = "yes";
}; };
"homeserver" = { homeserver = {
user = "jmug"; user = "jmug";
hostname = "100.122.244.59"; hostname = "100.122.244.59";
identityFile = [
"/home/jmug/.ssh/id_yubikey" # Auto updated symlik that matches all yubikeys.
"/home/jmug/.ssh/id_jmug" # Fallback key with passphrase.
];
forwardAgent = true; forwardAgent = true;
addKeysToAgent = "yes";
}; };
"racknerd" = { racknerd = {
user = "jmug"; user = "jmug";
hostname = "155.94.155.137"; hostname = "155.94.155.137";
identityFile = [ };
"/home/jmug/.ssh/id_yubikey" # Auto updated symlik that matches all yubikeys. handmade = {
"/home/jmug/.ssh/id_jmug" # Fallback key with passphrase. user = "jmug";
]; hostname = "82.180.160.149";
addKeysToAgent = "yes";
}; };
}; };
}; };