fix: cloonar assistant config server
This commit is contained in:
@@ -6,9 +6,11 @@
|
|||||||
users = [
|
users = [
|
||||||
{
|
{
|
||||||
username = "ca-test";
|
username = "ca-test";
|
||||||
key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGzJRWe8hsqAVnGSjPrcheloteWMzORoQ5Gj4IfhCROF";
|
key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDglSLU9AUtbU0fCN0eByi/EHyo1QiPPLiscN5RAR+wq";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
userList = lib.concatStringsSep "," (map (u: u.username) users);
|
||||||
in {
|
in {
|
||||||
environment.etc = {
|
environment.etc = {
|
||||||
# our single user+key file
|
# our single user+key file
|
||||||
@@ -39,7 +41,7 @@ in {
|
|||||||
) users;
|
) users;
|
||||||
|
|
||||||
services.openssh.extraConfig = ''
|
services.openssh.extraConfig = ''
|
||||||
Match Exec "/bin/grep -qE '^%u[[:space:]]' /etc/cloonar_assistant_ssh/sftp_users_keys"
|
Match User ${userList}
|
||||||
X11Forwarding no
|
X11Forwarding no
|
||||||
AllowTcpForwarding no
|
AllowTcpForwarding no
|
||||||
ChrootDirectory /home/cloonar-assistant-configs/%u
|
ChrootDirectory /home/cloonar-assistant-configs/%u
|
||||||
|
|||||||
Reference in New Issue
Block a user