forked from gravitational/teleport
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[forward-port] Teleport lab - open 3024 port in and copy changes.
- Loading branch information
1 parent
9196d8a
commit 994d2c7
Showing
2 changed files
with
14 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
``` | ||
|
||
|
@@ -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 | ||
# ------------- -------------- -------------------------- | ||
|
@@ -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. | ||
|
@@ -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; | ||
``` | ||
``` |