Skip to content

Commit

Permalink
[forward-port] Teleport lab - open 3024 port in and copy changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
flyinghermit authored and russjones committed Sep 23, 2021
1 parent 9196d8a commit 994d2c7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
1 change: 1 addition & 0 deletions docker/teleport-lab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ services:
command: -c "/usr/bin/dumb-init teleport start -d -c /etc/teleport.d/teleport.yaml"
ports:
- "3023:3023"
- "3024:3024"
- "3025:3025"
- "443:443"
volumes:
Expand Down
23 changes: 13 additions & 10 deletions docs/pages/getting-started/docker-compose.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ $ docker-compose -f teleport-lab.yml down
Let's jump into container with setup clients and explore Teleport:

```code
# From your local terminal
$ docker exec -ti term /bin/bash
```

Expand All @@ -60,31 +61,36 @@ Let's Try a couple of commands to get started.
Teleport speaks SSH. You can SSH into it using OpenSSH:

```code
# From term container
$ ssh [email protected]
```

Teleport is a bastion server for your OpenSSH hosts. SSH into OpenSSH server and record all commands:

```code
# From term container
$ ssh [email protected]
```

You can also run ansible on Teleport nodes and OpenSSH servers:

```code
# From term container
$ cd /etc/teleport.d/ansible && ansible all -m ping
```

Try Teleport's client command: `tsh`. It's like `ssh`, but with superpowers.
Find all hosts matching label `env=example` and run `hostname` command:

```code
# From term container
$ tsh ssh root@env=example hostname
```

You can see Teleport's nodes registered in the cluster using `tsh ls` command:

```code
# From term container
$ tsh ls
# Node Name Address Labels
# ------------- -------------- --------------------------
Expand All @@ -93,22 +99,19 @@ $ tsh ls

## Step 3/3. Explore web UI

To create a user inside your Teleport container, use `docker exec`.

This example command will create a Teleport user called `testuser` which is allowed to log in as either operating system user `root` or `ubuntu`:

From terminal:
Create a Teleport user called `testuser` which is allowed to log in as either operating system user `root` or `ubuntu`.

```code
$ tctl users add testuser --roles=editor,access --logins=root,ubuntu,ec2-user
# From term container
$ tctl users add testuser --roles=editor,access --logins=root,ubuntu
```

Teleport will output a URL that you must open to complete the user sign-up process:

```code
User testuser has been created but requires a password. Share this URL with the user to complete user setup, link is valid for 1h0m0s:
https://localhost:443/web/invite/your-token-here
NOTE: Make sure localhost:443 points at a Teleport proxy which users can access.
User "testuser" has been created but requires a password. Share this URL with the user to complete user setup, link is valid for 1h:
https://proxy.luna.teleport:443/web/invite/your-token-here
NOTE: Make sure proxy.luna.teleport:443 points at a Teleport proxy which users can access.
```

The Web UI will be available at the displayed URL.
Expand Down Expand Up @@ -214,4 +217,4 @@ tctl auth sign --host=mars.openssh.teleport --format=openssh --overwrite --out=m
# Adds generated certs to SSH agent on start
cd /mnt/shared/certs && /usr/bin/ssh-add bot;
```
```

0 comments on commit 994d2c7

Please sign in to comment.