The "connect ssh" command command performs a target authorization or consumes an existing authorization token, and launches a proxied SSH connection.
---
# connect ssh
Command: `boundary connect ssh`
The `connect ssh` command authorizes a session against a target and invokes an SSH client for the connection.
The command fills in the local address and port.
You can specify your SSH client of choice using the `-style` option.
@include 'cmd-connect-env-vars.mdx'
The SSH helper command sets the host key `Alias`.
When an `Alias` is set, SSH does not use `localhost:<port>` for host key validation, but instead uses one of the following:
- For connections to a target that has an attached host set, the SSH helper command sets the `HostID` as the alias.
- For connections directly to a host, the SSH helper command sets the `HostID` as the alias.
- For connections to a target that has an address field configured, the SSH helper command sets the `TargetID` as the alias.
## Examples
The following example authorizes a session to a target with the ID `ttcp_eTcZMueUYv` and invokes the default SSH client without any additional options:
<CodeBlockConfig hideClipboard>
```shell-session
$ boundary connect ssh -target-id ttcp_eTcZMueUYv
```
</CodeBlockConfig>
The following example authorizes a session to a target with the ID `ttcp_eTcZMueUYv`, and pipes arguments directly to the invoked SSH binary.
Any SSH arguments after the double hyphen are sent directly to the binary:
<CodeBlockConfig hideClipboard>
```shell-session
$ boundary connect ssh -target-id ttcp_eTcZMueUYv -- -A
```
</CodeBlockConfig>
<CodeBlockConfig hideClipboard>
```shell-session
$ boundary connect ssh -target-scope-name Helpdesk -target-name ubuntu-server -- -A