> ## Documentation Index
> Fetch the complete documentation index at: https://ngrok.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Using ngrok with SSH

> Learn how to use ngrok TCP endpoints to access your local SSH server remotely on port 22 with proper port specification.

This guide shows you how to expose your local SSH server with an ngrok TCP endpoint and connect from a remote client.

## Expose your SSH server

ngrok's TCP endpoints work well for SSH traffic.
Start a TCP endpoint to port `22` and you're ready to connect.

```sh theme={null}
ngrok tcp 22
```

<Warning>
  TCP endpoints are only available on a free plan after [adding a valid payment method](https://dashboard.ngrok.com/settings#id-verification) to your account.
</Warning>

## Connect via the ngrok TCP address

When connecting through the ngrok TCP address, specify the port separately.

```sh theme={null}
ssh -p PORT user@NGROK_TCP_ADDRESS
```

If you're getting a failed connection, the cause is usually a misconfiguration on the server you're connecting to or the credentials you're using.
