mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 22:27:48 +00:00
Update infisical ssh docs to clarify ssh connect command in different modes
This commit is contained in:
@@ -136,15 +136,17 @@ Once Infisical SSH is configured by an administrator, users can SSH to the remot
|
|||||||
<Step title="Install the Infisical CLI">
|
<Step title="Install the Infisical CLI">
|
||||||
Follow the instructions [here](/cli/overview) to install the Infisical CLI onto your local machine.
|
Follow the instructions [here](/cli/overview) to install the Infisical CLI onto your local machine.
|
||||||
</Step>
|
</Step>
|
||||||
<Step title="Log in with the CLI">
|
<Step title="Connect to the remote host">
|
||||||
Run the `infisical login` command to authenticate with Infisical.
|
The `infisical ssh connect` command can be used in either interactive or non-interactive mode to connect to a remote host.
|
||||||
|
|
||||||
|
### Interactive Mode
|
||||||
|
In interactive mode, you'll first need to authenticate with Infisical by running:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
infisical login
|
infisical login
|
||||||
```
|
```
|
||||||
</Step>
|
|
||||||
<Step title="Connect to the remote host">
|
Then simply run:
|
||||||
Run the `infisical ssh connect` command to connect to a remote host.
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
infisical ssh connect
|
infisical ssh connect
|
||||||
@@ -174,6 +176,23 @@ Once Infisical SSH is configured by an administrator, users can SSH to the remot
|
|||||||
✔ SSH credentials successfully added to agent
|
✔ SSH credentials successfully added to agent
|
||||||
Connecting to [email protected]...
|
Connecting to [email protected]...
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Non-Interactive Mode
|
||||||
|
For CI/CD pipelines or automation scenarios, you can use the non-interactive mode with an Infisical token:
|
||||||
|
|
||||||
|
```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 \
|
||||||
|
--token <your-infisical-token>
|
||||||
|
```
|
||||||
|
|
||||||
|
This will:
|
||||||
|
- Connect to the specified hostname
|
||||||
|
- Use the specified login user
|
||||||
|
- Write the SSH credentials to the specified path instead of adding them to the SSH agent
|
||||||
|
- Authenticate using the provided Infisical token
|
||||||
</Step>
|
</Step>
|
||||||
|
|
||||||
</Steps>
|
</Steps>
|
||||||
|
|||||||
Reference in New Issue
Block a user