InfoGrab Docs

명령줄 도구 레퍼런스

요약

Teleport는 여섯 가지 CLI 도구로 구성됩니다. When running Teleport in production, you should adhere to the following best practices to avoid security incidents:

Teleport는 여섯 가지 CLI 도구로 구성됩니다.

  • teleport: 다양한 Teleport 서비스를 시작하고 구성하여 Teleport Infrastructure Identity Platform을 지원합니다.
  • teleport-update: Teleport 바이너리를 설치하고 업데이트합니다.
  • tsh: 최종 사용자가 Teleport에 인증하고 클러스터의 리소스에 접근할 수 있도록 합니다.
  • tctl: Teleport Auth 서비스를 구성하는 데 사용됩니다.
  • tbot: 머신 및 워크로드 아이덴티티를 지원하며, 서비스 계정(예: CI/CD 서버)에 단명 자격 증명을 제공합니다.
  • fdpass-teleport: 더 높은 성능의 SSH 연결을 위해 머신 및 워크로드 아이덴티티와 OpenSSH를 통합하는 것을 지원합니다.
Best practices for production security

When running Teleport in production, you should adhere to the following best practices to avoid security incidents:

  • Avoid using sudo in production environments unless it's necessary.
  • Create new, non-root, users and use test instances for experimenting with Teleport.
  • Run Teleport's services as a non-root user unless required. Only the SSH Service requires root access. Note that you will need root permissions (or the CAP_NET_BIND_SERVICE capability) to make Teleport listen on a port numbered < 1024 (e.g. 443).
  • Follow the principle of least privilege. Don't give users permissive roles when more a restrictive role will do. For example, don't assign users the built-in access,editor roles, which give them permissions to access and edit all cluster resources. Instead, define roles with the minimum required permissions for each user and configure Access Requests to provide temporary elevated permissions.
  • When you enroll Teleport resources—for example, new databases or applications—you should save the invitation token to a file. If you enter the token directly on the command line, a malicious user could view it by running the history command on a compromised system.

You should note that these practices aren't necessarily reflected in the examples used in documentation. Examples in the documentation are primarily intended for demonstration and for development environments.

CLI 경험 개선: 셸 자동 완성 활성화

Teleport의 CLI 도구는 bash 및 zsh에 대한 자동 완성 힌트를 제공할 수 있습니다. 예를 들어 tsh를 입력하고 Tab을 누르면 사용 가능한 모든 하위 명령이 표시되고, tsh --를 입력하고 Tab을 누르면 사용 가능한 모든 플래그가 표시됩니다.

자동 완성을 활성화하려면 셸 구성 파일에 추가 문을 추가하세요.

예시 (.bashrc):

eval "$(tsh --completion-script-bash)"

예시 (.zshrc):

# 자동 완성 기능 활성화
autoload -Uz compinit
compinit

eval "$(tsh --completion-script-zsh)"

변경 사항을 적용하려면 셸을 다시 로드하세요.

tctl, teleporttbot에 대해 동일한 프로세스를 반복할 수 있습니다.

리소스 필터링#

tshtctl 모두 --search--query 플래그를 사용하여 서버, 애플리케이션, 데이터베이스, 데스크탑 및 Kubernetes 클러스터를 필터링할 수 있습니다.

--search 플래그는 리소스 필드에서 간단한 퍼지 검색을 수행합니다. 예를 들어 --search=macmac이 포함된 리소스를 검색합니다.

--query 플래그를 사용하면 술어 언어를 사용하여 더 정교한 검색을 수행할 수 있습니다.

두 경우 모두 명령에 쉼표로 구분된 레이블 목록을 추가하여 결과를 더 세밀하게 조정할 수 있습니다. 예를 들어:

$ tsh ls --search=foo,bar labelKey1=labelValue1,labelKey2=labelValue2

필터 예시#

# 모든 노드 나열
$ tsh ls

# 레이블 인수를 사용하여 노드 나열
$ tsh ls env=staging,os=mac

# 검색 키워드를 사용하여 노드 나열
$ tsh ls --search=staging,mac

# 술어 언어를 사용하여 노드 나열. 이 쿼리는 키가 `env`인 레이블이
# `staging`이고 키가 `os`인 레이블이 `mac`인 노드를 검색합니다.
$ tsh ls --query='labels["env"] == "staging" && equals(labels["os"], "mac")'

명령줄 도구 레퍼런스

원문 보기
요약

Teleport는 여섯 가지 CLI 도구로 구성됩니다. When running Teleport in production, you should adhere to the following best practices to avoid security incidents:

Teleport는 여섯 가지 CLI 도구로 구성됩니다.

  • teleport: 다양한 Teleport 서비스를 시작하고 구성하여 Teleport Infrastructure Identity Platform을 지원합니다.
  • teleport-update: Teleport 바이너리를 설치하고 업데이트합니다.
  • tsh: 최종 사용자가 Teleport에 인증하고 클러스터의 리소스에 접근할 수 있도록 합니다.
  • tctl: Teleport Auth 서비스를 구성하는 데 사용됩니다.
  • tbot: 머신 및 워크로드 아이덴티티를 지원하며, 서비스 계정(예: CI/CD 서버)에 단명 자격 증명을 제공합니다.
  • fdpass-teleport: 더 높은 성능의 SSH 연결을 위해 머신 및 워크로드 아이덴티티와 OpenSSH를 통합하는 것을 지원합니다.
Best practices for production security

When running Teleport in production, you should adhere to the following best practices to avoid security incidents:

  • Avoid using sudo in production environments unless it's necessary.
  • Create new, non-root, users and use test instances for experimenting with Teleport.
  • Run Teleport's services as a non-root user unless required. Only the SSH Service requires root access. Note that you will need root permissions (or the CAP_NET_BIND_SERVICE capability) to make Teleport listen on a port numbered < 1024 (e.g. 443).
  • Follow the principle of least privilege. Don't give users permissive roles when more a restrictive role will do. For example, don't assign users the built-in access,editor roles, which give them permissions to access and edit all cluster resources. Instead, define roles with the minimum required permissions for each user and configure Access Requests to provide temporary elevated permissions.
  • When you enroll Teleport resources—for example, new databases or applications—you should save the invitation token to a file. If you enter the token directly on the command line, a malicious user could view it by running the history command on a compromised system.

You should note that these practices aren't necessarily reflected in the examples used in documentation. Examples in the documentation are primarily intended for demonstration and for development environments.

CLI 경험 개선: 셸 자동 완성 활성화

Teleport의 CLI 도구는 bash 및 zsh에 대한 자동 완성 힌트를 제공할 수 있습니다. 예를 들어 tsh를 입력하고 Tab을 누르면 사용 가능한 모든 하위 명령이 표시되고, tsh --를 입력하고 Tab을 누르면 사용 가능한 모든 플래그가 표시됩니다.

자동 완성을 활성화하려면 셸 구성 파일에 추가 문을 추가하세요.

예시 (.bashrc):

eval "$(tsh --completion-script-bash)"

예시 (.zshrc):

# 자동 완성 기능 활성화
autoload -Uz compinit
compinit

eval "$(tsh --completion-script-zsh)"

변경 사항을 적용하려면 셸을 다시 로드하세요.

tctl, teleporttbot에 대해 동일한 프로세스를 반복할 수 있습니다.

리소스 필터링#

tshtctl 모두 --search--query 플래그를 사용하여 서버, 애플리케이션, 데이터베이스, 데스크탑 및 Kubernetes 클러스터를 필터링할 수 있습니다.

--search 플래그는 리소스 필드에서 간단한 퍼지 검색을 수행합니다. 예를 들어 --search=macmac이 포함된 리소스를 검색합니다.

--query 플래그를 사용하면 술어 언어를 사용하여 더 정교한 검색을 수행할 수 있습니다.

두 경우 모두 명령에 쉼표로 구분된 레이블 목록을 추가하여 결과를 더 세밀하게 조정할 수 있습니다. 예를 들어:

$ tsh ls --search=foo,bar labelKey1=labelValue1,labelKey2=labelValue2

필터 예시#

# 모든 노드 나열
$ tsh ls

# 레이블 인수를 사용하여 노드 나열
$ tsh ls env=staging,os=mac

# 검색 키워드를 사용하여 노드 나열
$ tsh ls --search=staging,mac

# 술어 언어를 사용하여 노드 나열. 이 쿼리는 키가 `env`인 레이블이
# `staging`이고 키가 `os`인 레이블이 `mac`인 노드를 검색합니다.
$ tsh ls --query='labels["env"] == "staging" && equals(labels["os"], "mac")'