backwards/pinwheel: Add SSH key for backwards to access pinwheel
Pinwheel's sshd had no way to accept keys from other hosts. Give it the same `authorizedKeysCommand` setup as backwards and manatee, and authorize a new `alex.backwards-pinwheel` key that backwards uses for `ssh pinwheel`.
This commit is contained in:
1 parent
4f2c93d2b0
commit
4d0977c482
5 files changed
+43
No files matched your search
@@ -31,6 +31,13 @@ in
|
|||||||
Port = 1122;
|
Port = 1122;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
"pinwheel" = {
|
||||||
|
HostName = "pinwheel";
|
||||||
|
User = "alex";
|
||||||
|
IdentityFile = "/home/alex/.ssh/alex.backwards-pinwheel";
|
||||||
|
Port = 1122;
|
||||||
|
};
|
||||||
|
|
||||||
"git.ppp.pm" = {
|
"git.ppp.pm" = {
|
||||||
HostName = "git.ppp.pm";
|
HostName = "git.ppp.pm";
|
||||||
IdentityFile = "/home/alex/.ssh/alex.backwards-git.ppp.pm";
|
IdentityFile = "/home/alex/.ssh/alex.backwards-git.ppp.pm";
|
||||||
@@ -115,6 +122,19 @@ in
|
|||||||
group = "users";
|
group = "users";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
"alex.backwards-pinwheel" = {
|
||||||
|
file = ../../../../secrets/backwards/alex.backwards-pinwheel.age;
|
||||||
|
path = "/home/alex/.ssh/alex.backwards-pinwheel";
|
||||||
|
owner = "alex";
|
||||||
|
group = "users";
|
||||||
|
};
|
||||||
|
"alex.backwards-pinwheel.pub" = {
|
||||||
|
file = ../../../../secrets/backwards/alex.backwards-pinwheel.pub.age;
|
||||||
|
path = "/home/alex/.ssh/alex.backwards-pinwheel.pub";
|
||||||
|
owner = "alex";
|
||||||
|
group = "users";
|
||||||
|
};
|
||||||
|
|
||||||
"alex.pinwheel-backwards.pub" = {
|
"alex.pinwheel-backwards.pub" = {
|
||||||
file = ../../../../secrets/pinwheel/alex.pinwheel-backwards.pub.age;
|
file = ../../../../secrets/pinwheel/alex.pinwheel-backwards.pub.age;
|
||||||
path = "${authorizedKeysPath}/alex.pinwheel-backwards.pub";
|
path = "${authorizedKeysPath}/alex.pinwheel-backwards.pub";
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
let
|
||||||
|
authorizedKeysPath = "/home/alex/.ssh/authorized-keys";
|
||||||
|
in
|
||||||
{
|
{
|
||||||
# Enable gnome-keyring at system level for PAM integration
|
# Enable gnome-keyring at system level for PAM integration
|
||||||
services.gnome.gnome-keyring.enable = true;
|
services.gnome.gnome-keyring.enable = true;
|
||||||
@@ -154,6 +157,21 @@
|
|||||||
owner = "alex";
|
owner = "alex";
|
||||||
group = "users";
|
group = "users";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
"alex.backwards-pinwheel.pub" = {
|
||||||
|
file = ../../../../secrets/backwards/alex.backwards-pinwheel.pub.age;
|
||||||
|
path = "${authorizedKeysPath}/alex.backwards-pinwheel.pub";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.etc."ssh/authorized_keys_command" = {
|
||||||
|
mode = "0755";
|
||||||
|
text = ''
|
||||||
|
#!${pkgs.bash}/bin/bash
|
||||||
|
for file in ${authorizedKeysPath}/*; do
|
||||||
|
${pkgs.coreutils}/bin/cat "$file"
|
||||||
|
done
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
@@ -166,5 +184,8 @@
|
|||||||
type = "ed25519";
|
type = "ed25519";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
authorizedKeysCommand = "/etc/ssh/authorized_keys_command";
|
||||||
|
authorizedKeysCommandUser = "root";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
Binary file not shown.
Binary file not shown.
@@ -56,6 +56,8 @@ in {
|
|||||||
"backwards/root.backwards.pub.age".publicKeys = [ backwards alex ];
|
"backwards/root.backwards.pub.age".publicKeys = [ backwards alex ];
|
||||||
"backwards/alex.backwards-manatee.age".publicKeys = [ backwards alex ];
|
"backwards/alex.backwards-manatee.age".publicKeys = [ backwards alex ];
|
||||||
"backwards/alex.backwards-manatee.pub.age".publicKeys = [ backwards manatee alex ];
|
"backwards/alex.backwards-manatee.pub.age".publicKeys = [ backwards manatee alex ];
|
||||||
|
"backwards/alex.backwards-pinwheel.age".publicKeys = [ backwards alex ];
|
||||||
|
"backwards/alex.backwards-pinwheel.pub.age".publicKeys = [ backwards pinwheel alex ];
|
||||||
"backwards/alex.backwards-git.ppp.pm.age".publicKeys = [ backwards alex ];
|
"backwards/alex.backwards-git.ppp.pm.age".publicKeys = [ backwards alex ];
|
||||||
"backwards/alex.backwards-git.ppp.pm.pub.age".publicKeys = [ backwards alex ];
|
"backwards/alex.backwards-git.ppp.pm.pub.age".publicKeys = [ backwards alex ];
|
||||||
"backwards/wireless-network-secrets.age".publicKeys = [ backwards alex ];
|
"backwards/wireless-network-secrets.age".publicKeys = [ backwards alex ];
|
||||||
|
|||||||
Reference in new issue
Block a user