first commit
This commit is contained in:
		
							
								
								
									
										21
									
								
								etc_org/systemd/system/sshdgenkeys.service
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								etc_org/systemd/system/sshdgenkeys.service
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,21 @@
 | 
			
		||||
[Unit]
 | 
			
		||||
Description=SSH key generation on first startup
 | 
			
		||||
Before=ssh.service
 | 
			
		||||
ConditionPathExists=|!/etc/ssh/ssh_host_key
 | 
			
		||||
ConditionPathExists=|!/etc/ssh/ssh_host_key.pub
 | 
			
		||||
ConditionPathExists=|!/etc/ssh/ssh_host_rsa_key
 | 
			
		||||
ConditionPathExists=|!/etc/ssh/ssh_host_rsa_key.pub
 | 
			
		||||
ConditionPathExists=|!/etc/ssh/ssh_host_dsa_key
 | 
			
		||||
ConditionPathExists=|!/etc/ssh/ssh_host_dsa_key.pub
 | 
			
		||||
ConditionPathExists=|!/etc/ssh/ssh_host_ecdsa_key
 | 
			
		||||
ConditionPathExists=|!/etc/ssh/ssh_host_ecdsa_key.pub
 | 
			
		||||
ConditionPathExists=|!/etc/ssh/ssh_host_ed25519_key
 | 
			
		||||
ConditionPathExists=|!/etc/ssh/ssh_host_ed25519_key.pub
 | 
			
		||||
 | 
			
		||||
[Service]
 | 
			
		||||
ExecStart=/usr/bin/ssh-keygen -A
 | 
			
		||||
Type=oneshot
 | 
			
		||||
RemainAfterExit=yes
 | 
			
		||||
 | 
			
		||||
[Install]
 | 
			
		||||
WantedBy=ssh.service
 | 
			
		||||
		Reference in New Issue
	
	Block a user