bugfix check for alternate ssh host certificate location (#34146)
fixes #34145 Edited all locations to actually be correct. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io> (cherry picked from commit fac6b87dd24be5021d9c656edc2072397cfd6bed)
This commit is contained in:
		
					parent
					
						
							
								89e4144855
							
						
					
				
			
			
				commit
				
					
						23b713464c
					
				
			
		
					 1 changed files with 9 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -31,16 +31,19 @@ if [ -e /data/ssh/ssh_host_ecdsa_cert ]; then
 | 
			
		|||
  SSH_ECDSA_CERT=${SSH_ECDSA_CERT:-"/data/ssh/ssh_host_ecdsa_cert"}
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [ -e /data/ssh/ssh_host_ed25519-cert.pub ]; then
 | 
			
		||||
  SSH_ED25519_CERT=${SSH_ED25519_CERT:-"/data/ssh/ssh_host_ed25519-cert.pub"}
 | 
			
		||||
# In case someone wants to sign the `{keyname}.pub` key by `ssh-keygen -s ca -I identity ...` to
 | 
			
		||||
# make use of the ssh-key certificate authority feature (see ssh-keygen CERTIFICATES section),
 | 
			
		||||
# the generated key file name is `{keyname}-cert.pub`
 | 
			
		||||
if [ -e /data/ssh/ssh_host_ed25519_key-cert.pub ]; then
 | 
			
		||||
  SSH_ED25519_CERT=${SSH_ED25519_CERT:-"/data/ssh/ssh_host_ed25519_key-cert.pub"}
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [ -e /data/ssh/ssh_host_rsa-cert.pub ]; then
 | 
			
		||||
  SSH_RSA_CERT=${SSH_RSA_CERT:-"/data/ssh/ssh_host_rsa-cert.pub"}
 | 
			
		||||
if [ -e /data/ssh/ssh_host_rsa_key-cert.pub ]; then
 | 
			
		||||
  SSH_RSA_CERT=${SSH_RSA_CERT:-"/data/ssh/ssh_host_rsa_key-cert.pub"}
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [ -e /data/ssh/ssh_host_ecdsa-cert.pub ]; then
 | 
			
		||||
  SSH_ECDSA_CERT=${SSH_ECDSA_CERT:-"/data/ssh/ssh_host_ecdsa-cert.pub"}
 | 
			
		||||
if [ -e /data/ssh/ssh_host_ecdsa_key-cert.pub ]; then
 | 
			
		||||
  SSH_ECDSA_CERT=${SSH_ECDSA_CERT:-"/data/ssh/ssh_host_ecdsa_key-cert.pub"}
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [ -d /etc/ssh ]; then
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue