Teleport 제거
이 가이드는 바이너리, 설정, 데이터를 포함하여 Teleport를 완전히 제거하는 방법을 설명합니다. 단일 호스트에서 Teleport 설치는 다음 구성 요소를 포함하며, Teleport를 제거하려면 이 모두를 삭제해야 합니다:
이 가이드는 바이너리, 설정, 데이터를 포함하여 Teleport를 완전히 제거하는 방법을 설명합니다.
작동 방식#
단일 호스트에서 Teleport 설치는 다음 구성 요소를 포함하며, Teleport를 제거하려면 이 모두를 삭제해야 합니다:
- 시스템 시작 시 Teleport를 실행하는 데몬 설정
- Teleport 바이너리
- Teleport 데이터 디렉터리 및 설정 파일
Teleport 제거는 Teleport 클러스터를 해체하는 것과는 별개의 작업이며, 클러스터 해체 방법은 Teleport Auth Service, Proxy Service 및 기타 Teleport 클러스터 구성 요소를 어떻게 배포했는지에 따라 다릅니다.
사전 조건#
- Teleport가 설치된 시스템.
이 지침은 비컨테이너 방식의 Teleport 설치에만 적용됩니다.
Kubernetes에서 Teleport를 실행 중인 경우, Helm 차트 릴리즈를 제거해야 합니다:
# 예시: 'teleport' 네임스페이스의 'teleport-kube-agent' Helm 릴리즈 제거
$ helm uninstall --namespace teleport teleport-kube-agent
Docker에서 Teleport를 실행 중인 경우, Teleport Docker 컨테이너를 중지해야 합니다:
# 예시: 'teleport'라는 이름의 Docker 컨테이너 중지
$ docker stop teleport
1단계/3단계. 실행 중인 Teleport 프로세스 중지#
systemd에 Teleport 프로세스를 중지하고 자동 시작을 비활성화하도록 지시합니다:
$ sudo systemctl stop teleport
$ sudo systemctl disable teleport
systemd 명령이 작동하지 않으면 실행 중인 모든 Teleport 프로세스를 강제 종료할 수 있습니다:
$ sudo killall teleport
launchd에 Teleport 프로세스를 중지하고 자동 시작을 비활성화하도록 지시합니다:
$ sudo launchctl unload -w /Library/LaunchDaemons/com.goteleport.teleport.plist
$ sudo rm -f /Library/LaunchDaemons/com.goteleport.teleport.plist
이 명령이 작동하지 않으면 실행 중인 모든 Teleport 프로세스를 강제 종료할 수 있습니다:
$ sudo killall teleport
현재 Windows 머신에는 장기 실행 Teleport 프로세스가 없습니다.
2단계/3단계. Teleport 바이너리 제거#
운영 체제에 맞는 단계를 따라 Teleport 바이너리를 제거합니다.
Linux#
먼저 Teleport 자동 업데이터(teleport-update)와 설치된 Teleport 버전을 제거합니다:
teleport-update uninstall
그런 다음 Linux 배포판에 맞는 지침을 따릅니다:
APT를 사용하여 Teleport 바이너리를 제거합니다:
$ sudo apt-get -y remove teleport-ent
Teleport 커뮤니티 에디션의 경우 다음 명령을 사용합니다:
$ sudo apt-get -y remove teleport
Teleport APT 저장소를 제거합니다:
$ sudo rm -f /etc/apt/sources.list.d/teleport.list
위의 명령이 작동하지 않으면 독립형 DEB 패키지로 Teleport를 설치했을 수 있습니다. 다음 명령으로 제거합니다:
# Teleport 커뮤니티 에디션의 경우 "teleport-ent" 대신 "teleport" 사용
$ sudo dpkg -r teleport-ent
YUM을 사용하여 Teleport 바이너리를 제거합니다:
# Teleport 커뮤니티 에디션의 경우 패키지 이름을 "teleport"로 변경
$ sudo yum -y remove teleport-ent
# 선택 사항: 최신 배포판에서는 DNF 사용
# $ sudo dnf -y remove teleport-ent
Teleport YUM 저장소를 제거합니다:
$ sudo rm -f /etc/yum.repos.d/teleport.repo
위의 명령이 작동하지 않으면 독립형 RPM 패키지로 Teleport를 설치했을 수 있습니다. 다음 명령으로 제거합니다:
# Teleport 커뮤니티 에디션의 경우 "teleport" 사용
$ sudo rpm -e teleport-ent
zypper를 사용하여 Teleport 바이너리를 제거합니다:
# Teleport 커뮤니티 에디션의 경우 패키지 이름을 "teleport"로 변경
$ sudo zypper -y remove teleport-ent
Teleport zypper 저장소를 제거합니다:
$ sudo zypper removerepo teleport
이것은 Teleport 바이너리의 기본 경로입니다. 시스템에서 기본값을 변경했다면 해당 경로로 대체하세요.
dirname $(which teleport)를 사용하여 자동으로 조회할 수 있습니다.
그런 다음 머신에서 Teleport 바이너리를 제거합니다:
$ sudo rm -f /usr/local/bin/tbot
$ sudo rm -f /usr/local/bin/tctl
$ sudo rm -f /usr/local/bin/teleport
$ sudo rm -f /usr/local/bin/tsh
$ sudo rm -f /usr/local/bin/fdpass-teleport
$ sudo rm -f /usr/local/bin/teleport-update
macOS#
이것은 Teleport 바이너리의 기본 경로입니다. 시스템에서 기본값을 변경했다면 해당 경로로 대체하세요.
dirname $(which teleport)를 사용하여 자동으로 조회할 수 있습니다.
머신에서 Teleport 바이너리 및 Teleport 소프트웨어 링크를 제거합니다:
$ sudo rm -f /usr/local/bin/tbot
$ sudo rm -f /usr/local/bin/tctl
$ sudo rm -f /usr/local/bin/teleport
$ sudo rm -f /usr/local/bin/tsh
$ sudo rm -f /usr/local/bin/fdpass-teleport
$ sudo rm -f /usr/local/bin/teleport-update
다음의 경우 /Applications 폴더에 Teleport 소프트웨어가 있을 수 있습니다:
tsh.app및tctl.app을 포함하는 v17+ macOS tarball에서 설치한 경우- v16 이하 버전의 macOS
tsh클라이언트 전용 패키지를 설치한 경우 - macOS용 Teleport Connect를 설치한 경우
다음 명령으로 제거할 수 있습니다:
$ sudo rm -rf /Applications/tsh.app
$ sudo rm -rf /Applications/tctl.app
$ sudo rm -rf /Applications/Teleport\ Connect.app
Windows#
머신에서 tsh.exe, tctl.exe, tbot.exe 바이너리를 제거합니다:
$ del C:\Path\To\tsh.exe
$ del C:\Path\To\tctl.exe
$ del C:\Path\To\tbot.exe
You can uninstall Teleport Connect from the "Apps and Features" section of the Control Panel.
For reference, Teleport Connect binaries are installed to %PROGRAMFILES%\Teleport Connect.
If you are using Teleport's Windows auth package to provide passwordless logins for local users, you can remove it by running the setup program from an administrative command prompt:
> teleport-windows-auth-setup.exe uninstall
A reboot is necessary after the uninstall completes in order to fully remove the package.
3단계/3단계. Teleport 데이터 및 설정 파일 제거#
이것은 Teleport 설정 파일 및 데이터 디렉터리의 기본 경로입니다. 시스템에서 기본값을 변경했다면 해당 경로로 대체하세요.
Teleport 설정 파일을 제거합니다:
```code
$ sudo rm -f /etc/teleport.yaml
# 선택 사항: tbot 설정 파일도 제거 (사용한 경우)
# $ sudo rm -f /etc/tbot.yaml
```
Teleport 데이터 디렉터리를 제거합니다:
```code
$ sudo rm -rf /var/lib/teleport
```
선택적으로 `tsh`의 글로벌 설정 파일 및 로컬 사용자 데이터 디렉터리도 제거합니다:
```code
$ sudo rm -f /etc/tsh.yaml
$ rm -rf ~/.tsh
```
이것은 Teleport 설정 파일 및 데이터 디렉터리의 기본 경로입니다. 시스템에서 기본값을 변경했다면 해당 경로로 대체하세요.
Teleport 설정 파일을 제거합니다:
```code
$ sudo rm -f /etc/teleport.yaml
# 선택 사항: tbot 설정 파일도 제거 (사용한 경우)
# $ sudo rm -f /etc/tbot.yaml
```
Teleport 데이터 디렉터리를 제거합니다:
```code
$ sudo rm -rf /var/lib/teleport
```
선택적으로 다음도 제거합니다:
- `tsh`의 글로벌 설정 파일 및 로컬 사용자 데이터 디렉터리
- Teleport Connect의 로컬 사용자 데이터 디렉터리
```code
# tsh
$ sudo rm -f /etc/tsh.yaml
$ rm -rf ~/.tsh
# Teleport Connect
$ rm -rf ~/Library/Application\ Support/Teleport\ Connect
```
tsh의 로컬 사용자 데이터 디렉터리를 제거합니다:
$ rmdir /s /q %USERPROFILE%\.tsh
선택적으로 Teleport Connect의 로컬 사용자 데이터 디렉터리도 제거합니다:
$ rmdir /s /q "%APPDATA%\Teleport Connect"
이제 시스템에서 Teleport가 제거되었습니다.
Teleport 서비스는 Teleport 프로세스를 중지한 후 마지막 하트비트가 만료되면 Teleport Web UI 또는 tsh ls 출력에서 더 이상 표시되지 않습니다. 이는 일반적으로 Teleport 프로세스를 중지한 후 10-15분 내에 발생합니다.
문제 해결#
"Teleport system symlinks creation" 오류#
시스템의 /usr/local/bin 디렉터리에 tarball로 Teleport 바이너리를 수동 설치한 경우, teleport 또는 teleport-ent RPM/DEB 패키지를 설치하려고 할 때 다음과 유사한 오류가 발생할 수 있습니다:
Setting up teleport-ent (18.5.0) ...
Teleport system symlinks creation...
2025-12-12T16:34:56.715-04:00 INFO [UPDATER] Validating binary name:fdpass-teleport agent/validate.go:68
2025-12-12T16:34:56.716-04:00 INFO [UPDATER] Binary does not support version command name:fdpass-teleport agent/validate.go:79
2025-12-12T16:34:56.716-04:00 ERRO [UPDATER] Command failed. error:[
ERROR REPORT:
Original Error: *errors.errorString file present
Stack Trace:
github.com/gravitational/teleport/lib/autoupdate/agent/installer.go:875 github.com/gravitational/teleport/lib/autoupdate/agent.needsLink
github.com/gravitational/teleport/lib/autoupdate/agent/installer.go:835 github.com/gravitational/teleport/lib/autoupdate/agent.(*LocalInstaller).tryLinks
github.com/gravitational/teleport/lib/autoupdate/agent/installer.go:483 github.com/gravitational/teleport/lib/autoupdate/agent.(*LocalInstaller).TryLinkSystem
github.com/gravitational/teleport/lib/autoupdate/agent/updater.go:1401 github.com/gravitational/teleport/lib/autoupdate/agent.(*Updater).LinkPackage
github.com/gravitational/teleport/tool/teleport-update/main.go:443 main.cmdLinkPackage github.com/gravitational/teleport/tool/teleport-update/main.go:251 main.Run
github.com/gravitational/teleport/tool/teleport-update/main.go:73 main.main
runtime/proc.go:283 runtime.main
runtime/asm_amd64.s:1700 runtime.goexit
User Message: failed to link system package installation
error evaluating link for fdpass-teleport
refusing to replace file at /usr/local/bin/fdpass-teleport
file present] teleport-update/main.go:271
dpkg: error processing package teleport-ent (--configure):
installed teleport-ent package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
teleport-ent
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)
이 오류는 다음 명령을 실행하여 이전에 설치된 바이너리 버전을 제거한 후 원래 명령으로 패키지 설치를 다시 실행하면 해결할 수 있습니다.
$ sudo rm -f /usr/local/bin/tbot
$ sudo rm -f /usr/local/bin/tctl
$ sudo rm -f /usr/local/bin/teleport
$ sudo rm -f /usr/local/bin/tsh
$ sudo rm -f /usr/local/bin/fdpass-teleport
$ sudo rm -f /usr/local/bin/teleport-update
