반응형
우분투에서 텔레포트(teleport)를 설치하는 방법(2)
WEB UI에서 리소스 등록
SSH 서버(node142) 등록-1
Teleport 에이전트 설치
sudo bash -c "$(curl -fsSL https://teleport.scbyun.com/scripts/c8943d4be39021f1a25230214f17988f/install-node.sh)"
$ sudo bash -c "$(curl -fsSL https://teleport.scbyun.com/scripts/c8943d4be39021f1a25230214f17988f/install-node.sh)"
2024-11-20 15:15:37 KST [teleport-installer] TELEPORT_VERSION: 17.0.1
2024-11-20 15:15:37 KST [teleport-installer] TARGET_HOSTNAME: teleport.scbyun.com
2024-11-20 15:15:37 KST [teleport-installer] TARGET_PORT: 443
2024-11-20 15:15:37 KST [teleport-installer] JOIN_TOKEN: c8943d4be39021f1a25230214f17988f
2024-11-20 15:15:37 KST [teleport-installer] CA_PIN_HASHES: sha256:420a6335d3443dbfd83e84d7446146ea5bd86f8c9092797c00e28d18da5af5e5
2024-11-20 15:15:37 KST [teleport-installer] Checking TCP connectivity to Teleport server (teleport.scbyun.com:443)
2024-11-20 15:15:37 KST [teleport-installer] Connectivity to Teleport server (via nc) looks good
2024-11-20 15:15:37 KST [teleport-installer] Detected host: linux-gnu, using Teleport binary type linux
2024-11-20 15:15:37 KST [teleport-installer] Detected arch: x86_64, using Teleport arch amd64
2024-11-20 15:15:37 KST [teleport-installer] Detected distro type: debian
2024-11-20 15:15:37 KST [teleport-installer] Using Teleport distribution: deb
2024-11-20 15:15:37 KST [teleport-installer] Created temp dir /tmp/teleport-nQaIBAsWPr
2024-11-20 15:15:37 KST [teleport-installer] Installing repo for distro ubuntu.
...
Teleport has been started.
View its status with 'sudo systemctl status teleport.service'
View Teleport logs using 'sudo journalctl -u teleport.service'
To stop Teleport, run 'sudo systemctl stop teleport.service'
To start Teleport again if you stop it, run 'sudo systemctl start teleport.service'
You can see this node connected in the Teleport web UI or 'tsh ls' with the name 'node142'
Find more details on how to use Teleport here: https://goteleport.com/docs/user-manual/
Teleport 설정 파일
더보기
---
cat /etc/teleport.yaml
version: v3
teleport:
nodename: node142
data_dir: /var/lib/teleport
join_params:
token_name: c8943d4be39021f1a25230214f17988f
method: token
proxy_server: teleport.scbyun.com:443
log:
output: stderr
severity: INFO
format:
output: text
ca_pin: sha256:420a6335d3443dbfd83e84d7446146ea5bd86f8c9092797c00e28d18da5af5e5
diag_addr: ""
auth_service:
enabled: "no"
ssh_service:
enabled: "yes"
labels:
teleport.internal/resource-id: c2e52823-8c30-4fa3-acf5-8dcced7efe65
proxy_service:
enabled: "no"
https_keypairs: []
https_keypairs_reload_interval: 0s
acme: {}
---
Teleport 에이전트 시작
sudo systemctl enable --now teleport
sudo systemctl restart teleport
Teleport 에이전트 서비스 상태 확인
sudo systemctl status teleport
SSH 서버(node142) 등록-2
WEB UI에서 리소스 확인
728x90
Teleport Connect 설치
Operating system support
클라이언트 프로그램 설치
tsh 및 tctl 클라이언트 설치
$TELEPORT_VERSION="17.0.1"
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$Resp = Invoke-WebRequest https://cdn.teleport.dev/teleport-v$TELEPORT_VERSION-windows-amd64-bin.zip.sha256
[System.Text.Encoding]::UTF8.getstring($Resp.Content)
Invoke-WebRequest -OutFile teleport-v$TELEPORT_VERSION-windows-amd64-bin.zip -Uri https://cdn.teleport.dev/teleport-v$TELEPORT_VERSION-windows-amd64-bin.zip
certUtil -hashfile teleport-v$TELEPORT_VERSION-windows-amd64-bin.zip SHA256
Expand-Archive teleport-v$TELEPORT_VERSION-windows-amd64-bin.zip
cd teleport-v$TELEPORT_VERSION-windows-amd64-bin
.\tsh.exe version
Teleport v17.0.1 git: go1.23.3
.\tctl.exe version
Teleport v17.0.1 git: go1.23.3
tsh를 사용해 Teleport 클러스터에 로그인
- 로그인 후 인증된 SSH 인증서가 생성됩니다.
tsh login --proxy=teleport.scbyun.com --user=ssh_username
Enter password for Teleport user ssh_username:
Enter an OTP code from a device:
> Profile URL: https://teleport.scbyun.com:443
Logged in as: ssh_username
Cluster: teleport.scbyun.com
Roles: no-otp-role
Logins: ubuntu, debian
Kubernetes: enabled
Valid until: 2024-11-21 04:56:55 +0900 KST [valid for 11h59m0s]
Extensions: login-ip, permit-port-forwarding, permit-pty, private-key-policy
node142에 연결
tsh ssh ubuntu@node142
ubuntu@node142:~$
참고URL
- Teleport Documentation : Windows (tsh and tctl clients only)
728x90
반응형
'리눅스' 카테고리의 다른 글
웹 서버가 HTTP/2 프로토콜을 지원하는지 확인하는 방법 (0) | 2023.04.28 |
---|---|
우분투에서 MySQL 바이너리 파일로 설치하는 방법 (0) | 2023.04.27 |
우분투에서 bash 자동 완성 기능을 사용하는 방법 (0) | 2023.04.22 |
[리눅스] HP ProLiant DL380 G7 Raid(raid 5) 구성하는 방법 (0) | 2023.04.21 |
우분투에서 HPE ssacli 도구 설치하는 방법(raid) (0) | 2023.04.19 |