https://computingforgeeks.com/run-teleport-in-docker-docker-compose/

 

https://github.com/gravitational/teleport#docker

 

https://gallery.ecr.aws/gravitational/teleport

TELEPORT_DOCKER_IMAGE=public.ecr.aws/gravitational/teleport:12

mkdir -p ~/teleport/{config,data}

TELEPORT_HOSTNAME=" teleport.example.com"

###아래의 Docker run은 실제 Docker를 실행하는게 아니고 설정파일을 만드는과정으로 빠지면 안됨
docker run --hostname ${TELEPORT_HOSTNAME} --rm \
  --entrypoint=/bin/sh \
  -v ~/teleport/config:/etc/teleport \
  ${TELEPORT_DOCKER_IMAGE} -c "teleport configure > /etc/teleport/teleport.yaml"


[root@ip-10-32-1-156 teleport]# cat docker-compose.yaml
version: '3.7'
services:
  teleport:
    image: "quay.io/gravitational/teleport:12.2.5-amd64"
    container_name: teleport
    restart: always
    hostname: "teleport.sabo.sbx.infograb.io"
    volumes:
      - ./config:/etc/teleport
      - ./data:/var/lib/teleport
    ports:
      - 3023:3023
      - 3024:3024
      - 3025:2025
      - 3080:3080
      


$ docker exec teleport tctl users add admin --roles=editor,access --logins=root,ubuntu,ec2-user

 

그리고 webpage.co.kr:3080 접속하면 계정 생성 페이지로 접속된다.

 

이후 MFA 설정 하고 로그인하면 된다.

 

 

위와같이 기본적으로 localhost 연결이 가능하고 이외에 애플리케이션, 대시보드등 접근이 가능하다.

위와같이 web 브라우져에서 바로 접속이 가능하다.(인터넷만 되는 환경에서 급한 작업 있을때 유용할듯 ?)

일단 애플리케이션(웹페이지)로의 접근은 필요성이 있을것같은데 서버 관리에 필요한 ssh 접근은 흠... 세션 레코딩 기능이 참 매력적이긴 한데...

 

일단 세션 레코딩만해도 큰 메리트가 있으니까 일단 접속해보자.

macos는 brew install teleport 명령어로 teleport 설치하고 tsh 명령어로 접근이 가능하다.
근데
The Teleport package in Homebrew is not maintained by Teleport and we can't guarantee its reliability or security. We recommend the use of our own Teleport packages.
라고 하니 

https://goteleport.com/download/?os=mac 에서 직접 설치해주자.

Download the MacOS .pkg installer (tsh client only, signed) and double-click to run it.

+ Recent posts