mirror of
				https://github.com/lxstinthesky/matrix.git
				synced 2025-11-03 17:32:44 +00:00 
			
		
		
		
	added an ssh key for neo
This commit is contained in:
		
							
								
								
									
										17
									
								
								nix/modules/security.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								nix/modules/security.nix
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,17 @@
 | 
			
		||||
{ config, pkgs, inputs, ... }:
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
  # providing an ssh configuration
 | 
			
		||||
  services.openssh = {
 | 
			
		||||
    enable = true;
 | 
			
		||||
    settings = {
 | 
			
		||||
      PermitRootLogin = "no";                    # Disable root login
 | 
			
		||||
      PasswordAuthentication = false;            # Force SSH key auth only
 | 
			
		||||
      PubkeyAuthentication = true;               # Enable SSH keys
 | 
			
		||||
    };
 | 
			
		||||
    ports = [ 22 ];
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  # other security hardening options can go here
 | 
			
		||||
  security.sudo.wheelNeedsPassword = false;
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user