-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change bash examples to code. Fixes copy/paste and more consistent (#…
- Loading branch information
1 parent
c35c425
commit 4f603a8
Showing
18 changed files
with
44 additions
and
44 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
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 |
---|---|---|
|
@@ -56,7 +56,7 @@ endpoint. | |
<Tabs> | ||
<TabItem label="PostgreSQL"> | ||
|
||
```bash | ||
```code | ||
$ teleport db start \ | ||
--token=/tmp/token \ | ||
--auth-server=teleport.example.com:3080 \ | ||
|
@@ -69,7 +69,7 @@ endpoint. | |
</TabItem> | ||
<TabItem label="MySQL"> | ||
|
||
```bash | ||
```code | ||
$ teleport db start \ | ||
--token=/tmp/token \ | ||
--auth-server=teleport.example.com:3080 \ | ||
|
@@ -92,7 +92,7 @@ endpoint. | |
<Tabs> | ||
<TabItem label="PostgreSQL"> | ||
|
||
```bash | ||
```code | ||
$ teleport db start \ | ||
--token=/tmp/token \ | ||
--auth-server=mytenant.teleport.sh \ | ||
|
@@ -105,7 +105,7 @@ endpoint. | |
</TabItem> | ||
<TabItem label="MySQL"> | ||
|
||
```bash | ||
```code | ||
$ teleport db start \ | ||
--token=/tmp/token \ | ||
--auth-server=mytenant.teleport.sh \ | ||
|
@@ -197,7 +197,7 @@ achieve that: | |
environment-based authentication with a client secret, the Database Service should | ||
have the following environment variables set: | ||
|
||
```bash | ||
```code | ||
export AZURE_TENANT_ID= | ||
export AZURE_CLIENT_ID= | ||
export AZURE_CLIENT_SECRET= | ||
|
@@ -229,14 +229,14 @@ fetch the access token and use it as a password when connecting to the database: | |
|
||
<Tabs> | ||
<TabItem label="PostgreSQL"> | ||
```bash | ||
```code | ||
$ az login -u [email protected] | ||
$ export PGPASSWORD=`az account get-access-token --resource-type oss-rdbms --output tsv --query accessToken` | ||
$ psql "host=example.postgres.database.azure.com [email protected]@instance-name sslmode=require dbname=postgres" | ||
``` | ||
</TabItem> | ||
<TabItem label="MySQL"> | ||
```bash | ||
```code | ||
$ az login -u [email protected] | ||
$ export TOKEN=`az account get-access-token --resource-type oss-rdbms --output tsv --query accessToken` | ||
$ mysql -h example.mysql.database.azure.com -P 3306 -u [email protected]@instance-name --enable-cleartext-plugin --password=$TOKEN | ||
|
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
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 |
---|---|---|
|
@@ -66,13 +66,13 @@ Install necessary packages: | |
|
||
<Tabs> | ||
<TabItem label="Ubuntu"> | ||
```bash | ||
```code | ||
$ sudo apt-get update | ||
$ sudo apt-get -y install sssd realmd krb5-user samba-common packagekit adcli | ||
``` | ||
</TabItem> | ||
<TabItem label="RHEL / CentOS 7"> | ||
```bash | ||
```code | ||
$ sudo yum -y update | ||
$ sudo yum -y install sssd realmd krb5-workstation samba-common-tools | ||
``` | ||
|
@@ -97,7 +97,7 @@ rdns = false | |
|
||
Join the realm: | ||
|
||
```bash | ||
```code | ||
$ sudo realm join -v -U [email protected] example.com | ||
... | ||
* Successfully enrolled machine in realm | ||
|
@@ -110,7 +110,7 @@ $ sudo realm join -v -U [email protected] example.com | |
|
||
To confirm the node has joined the realm, use the `realm list` command: | ||
|
||
```bash | ||
```code | ||
$ sudo realm list | ||
example.com | ||
type: kerberos | ||
|
@@ -133,23 +133,23 @@ domain: | |
|
||
<Tabs> | ||
<TabItem label="Ubuntu 18.04"> | ||
```bash | ||
```code | ||
$ curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - | ||
$ sudo curl https://packages.microsoft.com/config/ubuntu/18.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list | ||
$ sudo apt-get update | ||
$ sudo ACCEPT_EULA=Y apt-get install -y adutil | ||
``` | ||
</TabItem> | ||
<TabItem label="Ubuntu 20.04"> | ||
```bash | ||
```code | ||
$ sudo wget -qO /etc/apt/trusted.gpg.d/microsoft.asc https://packages.microsoft.com/keys/microsoft.asc | ||
$ sudo curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list | ||
$ sudo apt-get update | ||
$ sudo ACCEPT_EULA=Y apt-get install -y adutil | ||
``` | ||
</TabItem> | ||
<TabItem label="RHEL / CentOS 7"> | ||
```bash | ||
```code | ||
$ sudo curl -o /etc/yum.repos.d/msprod.repo https://packages.microsoft.com/config/rhel/8/prod.repo | ||
$ sudo ACCEPT_EULA=Y yum install -y adutil | ||
``` | ||
|
@@ -158,14 +158,14 @@ domain: | |
|
||
Log in to Active Directory using the `kinit` command: | ||
|
||
```bash | ||
```code | ||
$ kinit [email protected] | ||
``` | ||
|
||
Use the `adutil keytab create` command to generate keytab entries for each | ||
Active Directory user that will be connecting to the SQL Server database: | ||
|
||
```bash | ||
```code | ||
$ adutil keytab create teleport.keytab alice | ||
$ adutil keytab create teleport.keytab bob | ||
``` | ||
|
@@ -194,7 +194,7 @@ be merged into the same `teleport.keytab` file. | |
|
||
You can verify entries in the keytab file using `klist` command: | ||
|
||
```bash | ||
```code | ||
$ klist -ke teleport.keytab | ||
Keytab name: FILE:teleport.keytab | ||
KVNO Principal | ||
|
@@ -222,7 +222,7 @@ KVNO Principal | |
Start the Teleport Database Service. Make sure to update `--auth-server` to point to | ||
your Teleport Proxy Service address and `--uri` to the SQL Server endpoint. | ||
|
||
```bash | ||
```code | ||
$ teleport db start \ | ||
--token=/tmp/token \ | ||
--auth-server=teleport.example.com:3080 \ | ||
|
@@ -242,7 +242,7 @@ Start the Teleport Database Service. Make sure to update `--auth-server` to | |
point to your Teleport Cloud tenant address and `--uri` to the SQL Server | ||
endpoint. | ||
|
||
```bash | ||
```code | ||
$ teleport db start \ | ||
--token=/tmp/token \ | ||
--auth-server=mytenant.teleport.sh \ | ||
|
@@ -278,7 +278,7 @@ Server. Typically, they take a form of `MSSQLSvc/<name>.<ad-domain>:<port>`. | |
For example, an AWS RDS SQL Server named `sqlserver` and joined to an AWS managed | ||
Active Directory domain `EXAMPLE.COM` will have the following SPNs registered: | ||
|
||
```bash | ||
```code | ||
$ ldapsearch -x -h example.com -D admin -W -b DC=example,DC=com servicePrincipalName | ||
... | ||
# EC2AMAZ-4KN05DU, RDS, AWS Reserved, example.com | ||
|
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
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
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 |
---|---|---|
|
@@ -152,7 +152,7 @@ If you are getting a "Connection refused" error, that probably means that the `s | |
- Ensure that no configuration options or environment variables are conflicting | ||
with the `ssh` command, which will resemble the following: | ||
|
||
```bash | ||
```code | ||
$ sudo ssh -o UserKnownHostsFile=/dev/null \ | ||
-o StrictHostKeyChecking=no \ | ||
-N [email protected] \ | ||
|
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
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
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