Ssh vault
Author: s | 2025-04-24
🌰 encrypt/decrypt using ssh keys. Contribute to ssh-vault/ssh-vault development by creating an account on GitHub.
Releases ssh-vault/ssh-vault - GitHub
Shows all the nodes (gateways and relays) that are configured to access the CA, as well as health information for the nodes.If the CA is unable to be accessed by any gateway or relay, please review the CA’s Settings tab and make sure the CA credentials are correct.Additional Information Third-party CAs also may be added and managed in the CLI, SDKs, and Terraform. Note that third-party CAs are treated like secret stores in the CLI, SDKs, and Terraform. As such, they use secret store commands, domain objects, and resources.Add Vault SSH CA in the CLI To add a Vault SSH CA in the CLI instead of the Admin UI, use the sdm admin secretstores create CLI command. Create your “secret store” by choosing one the following secret store types and setting the correct options/properties.vaultTLSCertSSH corresponds to the HashiCorp Vault SSH CA type.vaultAppRoleCertSSH corresponds to the HashiCorp Vault SSH (AppRole) CA type.vaultTokenCertSSH corresponds to the HashiCorp Vault SSH (Token) CA type.In the CLI, the options are the same as the Vault SSH CA properties set in the Admin UI.CLI example # Create HashiCorp Vault SSH (Token) CAsdm admin secretstores create vaultTokenCertSSH--name="Example SSH CA" --server-address=" Create RDP (Certificate Based) serversdm admin servers create ssh-cert--name="Example SSH Vault"--hostname=" Run secret store healthchecksdm admin secretstores healthcheck se-e1b2# Check that the secret store is reachablesdm admin secretstores status# Check the connection to the resourcesdm ssh "Example SSH Vault"Add Vault SSH CA in Terraform In addition to using the Admin UI and CLI, you may use Terraform. 🌰 encrypt/decrypt using ssh keys. Contribute to ssh-vault/ssh-vault development by creating an account on GitHub. Follow the instructions below to modify your SSH server configuration, PAM configuration and vault-ssh-helper configuration. Check if vault-ssh-helper is installed and configured correctly and also is able to communicate with Vault server properly. Before verifying vault-ssh-helper, make sure that the Vault server is up and running and it has mounted the SSH backend. Follow the instructions below to modify your SSH server configuration, PAM configuration and vault-ssh-helper configuration. Check if vault-ssh-helper is installed and configured correctly and also is able to communicate with Vault server properly. Before verifying vault-ssh-helper, make sure that the Vault server is up and running and it has mounted the SSH backend. The user’s SSH public key will be signed by the Vault SSH CA and returned to the user. This signed SSH certificate will then be used to connect to the target host. Let's complete this with following steps. Create SSH Key Pair ssh-keygen -t ed -C -f ~/.ssh/vault-admin-key ssh-add ~/.ssh/vault-admin-key On the SSH Client server, download vault-ssh-helper. Add the ubuntu user. Unzip the vault-ssh-helper_0.1.6_linux_amd64.zip file and move it to /usr/local/bin. Update the permissions on the vault-ssh-helper binary. Change ownership of the binary from the cloud_user, to the root user, and root group. Create a new directory named vault-ssh-helper. The Vault SSH secrets engine provides secure authentication and authorization for access to machines via the SSH protocol. There are multiple modes to the Vault SSH secrets engine Issued by the CA must be signed by a role that is configured for the specific mount point of the CA. The signing role defines the default values for the SSH certificates as well as what extensions and features are allowed in the SSH certificates.Please ensure that your signing role in Vault matches the following example signing role, which includes the minimum required settings to work with certificate-based SSH resources.SSH example signing role { "algorithm_signer": "rsa-sha2-256", "allow_user_certificates": true, "allowed_users": "*", "allowed_extensions": "permit-X11-forwarding,permit-agent-forwarding,permit-port-forwarding,permit-pty,permit-user-rc", "default_extensions": { "permit-X11-forwarding": "", "permit-agent-forwarding": "", "permit-port-forwarding": "", "permit-pty": "", "permit-user-rc": "", }, "key_type": "ca", "default_user": "ubuntu", "max_ttl": "30m0s"}Add Vault CA in Admin UI To add a Vault SSH CA in the Admin UI, follow these steps.From the Settings > Credentials Management page in the Certificate Authorities tab, click Add certificate authority.Enter the Name for the CA (any name).For Type, select HashiCorp Vault SSH, HashiCorp Vault SSH (AppRole), or HashiCorp Vault SSH (Token). The type corresponds to your chosen authentication method that enables your StrongDM relay to authenticate with Vault: TLS certificate-based authentication, AppRole authentication, or token-based authentication.The form updates with other CA properties, some of which are specific to the selected type. Complete all required properties.Click Create certificate authority.Vault SSH CA properties The following properties are for HashiCorp Vault SSH, HashiCorp Vault SSH (AppRole), and/or HashiCorp Vault SSH (Token).PropertyRequirementDescriptionServer AddressRequiredAddress where the CA is stored (for example, Certificate PathRequiredPath to where the TLS certificate is stored on the relay (for example, /etc/strongdm/certs/client.crt)Client Private Key PathRequiredPath to whereComments
Shows all the nodes (gateways and relays) that are configured to access the CA, as well as health information for the nodes.If the CA is unable to be accessed by any gateway or relay, please review the CA’s Settings tab and make sure the CA credentials are correct.Additional Information Third-party CAs also may be added and managed in the CLI, SDKs, and Terraform. Note that third-party CAs are treated like secret stores in the CLI, SDKs, and Terraform. As such, they use secret store commands, domain objects, and resources.Add Vault SSH CA in the CLI To add a Vault SSH CA in the CLI instead of the Admin UI, use the sdm admin secretstores create CLI command. Create your “secret store” by choosing one the following secret store types and setting the correct options/properties.vaultTLSCertSSH corresponds to the HashiCorp Vault SSH CA type.vaultAppRoleCertSSH corresponds to the HashiCorp Vault SSH (AppRole) CA type.vaultTokenCertSSH corresponds to the HashiCorp Vault SSH (Token) CA type.In the CLI, the options are the same as the Vault SSH CA properties set in the Admin UI.CLI example # Create HashiCorp Vault SSH (Token) CAsdm admin secretstores create vaultTokenCertSSH--name="Example SSH CA" --server-address=" Create RDP (Certificate Based) serversdm admin servers create ssh-cert--name="Example SSH Vault"--hostname=" Run secret store healthchecksdm admin secretstores healthcheck se-e1b2# Check that the secret store is reachablesdm admin secretstores status# Check the connection to the resourcesdm ssh "Example SSH Vault"Add Vault SSH CA in Terraform In addition to using the Admin UI and CLI, you may use Terraform
2025-04-16Issued by the CA must be signed by a role that is configured for the specific mount point of the CA. The signing role defines the default values for the SSH certificates as well as what extensions and features are allowed in the SSH certificates.Please ensure that your signing role in Vault matches the following example signing role, which includes the minimum required settings to work with certificate-based SSH resources.SSH example signing role { "algorithm_signer": "rsa-sha2-256", "allow_user_certificates": true, "allowed_users": "*", "allowed_extensions": "permit-X11-forwarding,permit-agent-forwarding,permit-port-forwarding,permit-pty,permit-user-rc", "default_extensions": { "permit-X11-forwarding": "", "permit-agent-forwarding": "", "permit-port-forwarding": "", "permit-pty": "", "permit-user-rc": "", }, "key_type": "ca", "default_user": "ubuntu", "max_ttl": "30m0s"}Add Vault CA in Admin UI To add a Vault SSH CA in the Admin UI, follow these steps.From the Settings > Credentials Management page in the Certificate Authorities tab, click Add certificate authority.Enter the Name for the CA (any name).For Type, select HashiCorp Vault SSH, HashiCorp Vault SSH (AppRole), or HashiCorp Vault SSH (Token). The type corresponds to your chosen authentication method that enables your StrongDM relay to authenticate with Vault: TLS certificate-based authentication, AppRole authentication, or token-based authentication.The form updates with other CA properties, some of which are specific to the selected type. Complete all required properties.Click Create certificate authority.Vault SSH CA properties The following properties are for HashiCorp Vault SSH, HashiCorp Vault SSH (AppRole), and/or HashiCorp Vault SSH (Token).PropertyRequirementDescriptionServer AddressRequiredAddress where the CA is stored (for example, Certificate PathRequiredPath to where the TLS certificate is stored on the relay (for example, /etc/strongdm/certs/client.crt)Client Private Key PathRequiredPath to where
2025-04-20Execute commands within this directory.The Terraform files reads the credentials from the terraform.tfvars andgenerates the resources defined in the main.tf.Modify terraform.tfvars.example with a public SSH key, public_key, and Azurecredentials: tenant_id; client_id; client_secret and subscription_id.terraform.tfvars.exampletenant_id="0000000-0000-0000-0000000000"public_key = "ssh-rsa AAAA..."client_id="0000000-000000-0000000000"client_secret="AABBBCCCDDDDEEEFFF"subscription_id="0000000-0000-0000-0000-0000000000"Save the file and create a copy of the file named terraform.tfvars.$ cp terraform.tfvars.example terraform.tfvarsThe main.tf file generates a new resource group with:Virtual machine with Vault already installedAzure Vault Key (Test-vault-xxxx)A key (generated-key)Initialize the Azure provider plugins.Create an execution plan.$ terraform plan...Plan: 12 to add, 0 to change, 0 to destroy.Apply the changes.$ terraform apply -auto-approve...Outputs:ip = 13.82.62.56key_vault_name = Test-vault-1e5a88dessh-addr = Connect to your virtual machine via SSH: $ ssh [email protected] a variable named AZURE_VAULT_IP to store the IP address of the virtualmachine.$ AZURE_VAULT_IP=$(terraform output -raw ip)SSH into the virtual machine with the azureuser user.$ ssh azureuser@$AZURE_VAULT_IPWithin this SSH session, check the status of the Vault server.$ vault statusKey Value--- -----Recovery Seal Type azurekeyvaultInitialized falseSealed trueTotal Recovery Shares 0Threshold 0Unseal Progress 0/0Unseal Nonce n/aVersion n/aHA Enabled trueThe output displays that the Vault server is not initialized (Initialized isfalse).Initialize the Vault server.Check the status of the Vault server.$ vault statusKey Value--- -----Recovery Seal Type shamirInitialized trueSealed falseTotal Recovery Shares 5Threshold 3Version 1.3.0Cluster Name vault-cluster-092ba5deCluster ID 8b173565-7d74-fe5b-a199-a2b56b7019eeHA Enabled falseThe output displays that the Vault server status (Sealed is false).Vault started as a service. The service writes its output to a log.Display the Vault server log.$ sudo journalctl --no-pager -u vault...==> Vault server configuration: Azure Environment: AzurePublicCloud Azure Key Name: generated-key Azure Vault Name: Test-vault-a414d041 Seal Type: azurekeyvault Cgo: disabled Listener 1: tcp (addr: "0.0.0.0:8200", cluster address: "0.0.0.0:8201", max_request_duration: "1m30s", max_request_size: "33554432", tls: "disabled") Log Level: (not set) Mlock: supported: true, enabled: false Storage: file Version: Vault v1.3.0 Version Sha: 37a1dc9c477c1c68c022d2084550f25bf20cac33 ==> Vault server started! Log data will stream in below: [WARN] no `api_addr` value specified in
2025-03-30Removed from the live sessions list once it ends and the Primary Vault becomes available. PSM for SSH failed to start a session and the following error displayed: PSPSD072E Perform session error occurred. Reason: PSPSD033E Error receiving PSM For SSH server response (Extra information: [PSMPSCCDA002E Failed to create file in Vault. Reason: ITACM062S Communication error (Diagnostic information: 526) The Primary Vault is down and PSMPAllowSessionWithoutVault is set to No. Upgrade or repair of PSM for SSH failedThe address in vault.ini must be the Primary Vault address for installation, upgrade, or repair. Once the installation, upgrade, or repair completes, the address can be changed to the satellite IP. This requires a PSM for SSH restart. Failed to start a session and one of the following errors was displayed: PSPSD072E Perform session error occurred. Reason: PSPSD033E Error receiving PSM For SSH server response (Extra information: [PSMPSCCDA002E Failed to create file in Vault. Reason: ITATS023E Safe PSMRecordings is closed.], [1]). (Codes: -1, 1) PSPSD072E Perform session error occurred. Reason: PSPSD033E Error receiving PSM For SSH server response (Extra information: [289E [346780c0-b451-11e9-ac33-005056b26b25] Failed to impersonate as user [administrator]. Error: [ITACM074E Vault certificate names do not match the vault address property]], [1]). (Codes: -1, 1) PSPSD072E Perform session error occurred. Reason: PSPSD033E Error receiving PSM For SSH server response (Extra information: [PSMPSCCDA002E Failed to create file in Vault. Reason: CASTM067E Failed routing transaction to the master vault. Reason: master is not available.], [1]). (Codes: -1, 1) Verify in /etc/opt/CARKpsmp/vault/vault.ini that the following parameters are set
2025-03-31