Skip to content

Commit

Permalink
docs: include openssh instrs for jetbrains setup (gravitational#26251)
Browse files Browse the repository at this point in the history
* docs: include openssh instrs

* spacing

Co-authored-by: Alex Fornuto <[email protected]>

* replaced Node references with server

* Update notes

---------

Co-authored-by: Alex Fornuto <[email protected]>
  • Loading branch information
stevenGravy and alexfornuto authored Aug 14, 2023
1 parent a66aea5 commit e0afea9
Showing 1 changed file with 26 additions and 16 deletions.
42 changes: 26 additions & 16 deletions docs/pages/server-access/guides/jetbrains-sftp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This guide explains how to use Teleport and a JetBrains IDE to access files with

## Step 1/3. First-time setup

Configure your local SSH client to access Teleport Nodes, assigning the `--proxy` flag to the address of your Teleport Proxy Service (e.g., `mytenant.teleport.sh` for Teleport Cloud users).
Configure your local SSH client to access servers, assigning the `--proxy` flag to the address of your Teleport Proxy Service (e.g., `mytenant.teleport.sh` for Teleport Cloud users).

```code
# log in to your proxy:
Expand Down Expand Up @@ -53,31 +53,27 @@ in the path below:
</TabItem>
</Tabs>

You should be able to connect to the desired Node using the following command, replacing `user` with the username you would like to assume on the Node:
You should be able to connect to the desired server using the following command, replacing `user` with the username you would like to assume on the server:

```code
$ ssh user@[node name].[cluster name]
$ ssh user@[server name].[cluster name]
```

<Details scopeOnly={true} scope={["cloud"]} title="Teleport Cloud">
The SSH config you generated earlier instructs your SSH client to run `tsh proxy ssh` to access a Node in your Teleport cluster.
The SSH config you generated earlier instructs your SSH client to run `tsh proxy ssh` to access a server in your Teleport cluster.
However, running an `ssh` command against the Teleport Proxy Service at `yourtenant.teleport.sh` will result in an error.
</Details>

<Admonition type="note">
Teleport's certificates expire fairly quickly, after which SSH
attempts will fail with an error like the following:

```txt
[email protected]: Permission denied (publickey).
ERROR: exit status 255
Include the port number for OpenSSH servers, by default `22`, or you can experience an error.
See the [OpenSSH guide](./openssh.mdx) for more information.
Example connecting to a OpenSSH server:

kex_exchange_identification: Connection closed by remote host
```code
$ ssh -p 22 user@[server name].[cluster name]
```

When you see this error, re-run `tsh login` to refresh your local certificate.
</Admonition>

## Step 2/3. Configure your JetBrains IDE

After opening your IDE go to `Tools` -> `Deployment` -> `Browse Remote Host`.
Expand All @@ -98,8 +94,8 @@ Click the three dots next to `SSH configuration` as in the picture above.

Create a new configuration by clicking the plus sign on the top left and providing:

- `Host` - name of the Teleport Node.
- `Port` - the Teleport Node's SSH port (3022 by default).
- `Host` - name of the Teleport server.
- `Port` - the Teleport server's SSH port (`3022` by default or `22` for OpenSSH servers).
- `Username` - the system username.

As an `Authentication type` pick `OpenSSH config and authentication agent`.
Expand All @@ -113,6 +109,20 @@ After closing the SSH configuration window, you should see `Remote Host` menu in

![Browse window](../../../img/jetbrains-sftp/browse-window.png)

<Admonition type="note">
Teleport's certificates expire fairly quickly, after which SSH
attempts will fail with an error like the following:

```txt
[email protected]: Permission denied (publickey).
ERROR: exit status 255
kex_exchange_identification: Connection closed by remote host
```

When you see this error, re-run `tsh login` to refresh your local certificate.
</Admonition>

## Next steps

### Using OpenSSH clients
Expand Down

0 comments on commit e0afea9

Please sign in to comment.