fix #3 - Zmienne dla hosta vault oraz nazwy klucza.
This commit is contained in:
		@@ -1,3 +1,4 @@
 | 
			
		||||
project:
 | 
			
		||||
  group: devOps
 | 
			
		||||
  name: trust-ca-ssh
 | 
			
		||||
integration: cynarski
 | 
			
		||||
 
 | 
			
		||||
@@ -9,13 +9,18 @@ set -o pipefail
 | 
			
		||||
#
 | 
			
		||||
declare -i term_width=120
 | 
			
		||||
 | 
			
		||||
host=${1:-vlt.cynarski.dev}
 | 
			
		||||
key=${2:-ssh-cynarski}
 | 
			
		||||
 | 
			
		||||
h2() {
 | 
			
		||||
    printf '\e[1;33m==>\e[37;1m %s\e[0m\n' "$*"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
SSHD_CONFIG=/etc/ssh/sshd_config
 | 
			
		||||
CA_FILE=/etc/ssh/trusted-ca.pem
 | 
			
		||||
VAULT_CERT="https://vlt.cynarski.dev/v1/ssh-test/public_key"
 | 
			
		||||
VAULT_CERT="https://${host}/v1/${key}/public_key"
 | 
			
		||||
 | 
			
		||||
echo $VAULT_CERT
 | 
			
		||||
 | 
			
		||||
if !(grep -q "TrustedUserCAKeys" $SSHD_CONFIG); then
 | 
			
		||||
	h2 "Add new TrustedUserCAKeys"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user