mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Adjust CLI flags to be dash-case
This commit is contained in:
@@ -1103,19 +1103,19 @@ func init() {
|
||||
sshCmd.AddCommand(sshIssueCredentialsCmd)
|
||||
|
||||
sshConnectCmd.Flags().String("token", "", "Use a machine identity access token")
|
||||
sshConnectCmd.Flags().Bool("writeHostCaToFile", true, "Write Host CA public key to ~/.ssh/known_hosts as a separate entry if doesn't already exist")
|
||||
sshConnectCmd.Flags().Bool("write-host-ca-to-file", true, "Write Host CA public key to ~/.ssh/known_hosts as a separate entry if doesn't already exist")
|
||||
sshConnectCmd.Flags().String("hostname", "", "Hostname of the SSH host to connect to")
|
||||
sshConnectCmd.Flags().String("loginUser", "", "Login user for the SSH connection")
|
||||
sshConnectCmd.Flags().String("outFilePath", "", "The path to write the SSH credentials to such as ~/.ssh, ./some_folder, ./some_folder/id_rsa-cert.pub. If not provided, the credentials will be added to the SSH agent and used to establish an interactive SSH connection")
|
||||
sshConnectCmd.Flags().String("login-user", "", "Login user for the SSH connection")
|
||||
sshConnectCmd.Flags().String("out-file-path", "", "The path to write the SSH credentials to such as ~/.ssh, ./some_folder, ./some_folder/id_rsa-cert.pub. If not provided, the credentials will be added to the SSH agent and used to establish an interactive SSH connection")
|
||||
sshCmd.AddCommand(sshConnectCmd)
|
||||
|
||||
sshAddHostCmd.Flags().String("token", "", "Use a machine identity access token")
|
||||
sshAddHostCmd.Flags().String("projectId", "", "Project ID the host belongs to (required)")
|
||||
sshAddHostCmd.Flags().String("hostname", "", "Hostname of the SSH host (required)")
|
||||
sshAddHostCmd.Flags().Bool("writeUserCaToFile", false, "Write User CA public key to /etc/ssh/infisical_user_ca.pub")
|
||||
sshAddHostCmd.Flags().String("userCaOutFilePath", "/etc/ssh/infisical_user_ca.pub", "Custom file path to write the User CA public key")
|
||||
sshAddHostCmd.Flags().Bool("writeHostCertToFile", false, "Write SSH host certificate to /etc/ssh/ssh_host_<type>_key-cert.pub")
|
||||
sshAddHostCmd.Flags().Bool("configureSshd", false, "Update TrustedUserCAKeys, HostKey, and HostCertificate in the sshd_config file")
|
||||
sshAddHostCmd.Flags().Bool("write-user-ca-to-file", false, "Write User CA public key to /etc/ssh/infisical_user_ca.pub")
|
||||
sshAddHostCmd.Flags().String("user-ca-out-file-path", "/etc/ssh/infisical_user_ca.pub", "Custom file path to write the User CA public key")
|
||||
sshAddHostCmd.Flags().Bool("write-host-cert-to-file", false, "Write SSH host certificate to /etc/ssh/ssh_host_<type>_key-cert.pub")
|
||||
sshAddHostCmd.Flags().Bool("configure-sshd", false, "Update TrustedUserCAKeys, HostKey, and HostCertificate in the sshd_config file")
|
||||
sshAddHostCmd.Flags().Bool("force", false, "Force overwrite of existing certificate files as part of writeUserCaToFile and writeHostCertToFile")
|
||||
|
||||
sshCmd.AddCommand(sshAddHostCmd)
|
||||
|
||||
@@ -72,7 +72,7 @@ we will register a remote host with Infisical through a [machine identity](/docu
|
||||
Next, use the `infisical ssh add-host` command to register the remote host with Infisical. As part of this command, input the ID of the Infisical SSH project you created in step 1 for the `--projectId` flag and the hostname of the remote host for the `--hostname` flag.
|
||||
|
||||
```bash
|
||||
sudo infisical ssh add-host --projectId=<project-id> --hostname=<hostname> --token="$INFISICAL_TOKEN" --writeUserCaToFile --writeHostCertToFile --configureSshd
|
||||
sudo infisical ssh add-host --projectId=<project-id> --hostname=<hostname> --token="$INFISICAL_TOKEN" --write-user-ca-to-file --write-host-cert-to-file --configure-sshd
|
||||
```
|
||||
|
||||
<Tip>
|
||||
@@ -184,8 +184,8 @@ Once Infisical SSH is configured by an administrator, users can SSH to the remot
|
||||
```bash
|
||||
infisical ssh connect \
|
||||
--hostname ec2-12-345-678-910.ap-northeast-1.compute.amazonaws.com \
|
||||
--loginUser ec2-user \
|
||||
--outFilePath ~/.ssh/id_rsa-cert.pub \
|
||||
--login-user ec2-user \
|
||||
--out-file-path ~/.ssh/id_rsa-cert.pub \
|
||||
--token <your-infisical-token>
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user