본문 바로가기

리눅스

우분투에서 텔레포트(teleport)를 설치하는 방법(2)

728x90

우분투에서 텔레포트(teleport)를 설치하는 방법(2)

SSH 서버(node-02) 등록

t1
t2

sudo bash -c "$(curl -fsSL https://teleport.sangchul.kr/scripts/2c64ee279f6258272bbf6ff9e5ebdfd1/install-node.sh)"
$ sudo bash -c "$(curl -fsSL https://teleport.sangchul.kr/scripts/2c64ee279f6258272bbf6ff9e5ebdfd1/install-node.sh)"
2023-04-25 22:50:46 KST [teleport-installer] TELEPORT_VERSION: 12.2.4
2023-04-25 22:50:46 KST [teleport-installer] TARGET_HOSTNAME: teleport.sangchul.kr
2023-04-25 22:50:46 KST [teleport-installer] TARGET_PORT: 443
2023-04-25 22:50:46 KST [teleport-installer] JOIN_TOKEN: 2c64ee279f6258272bbf6ff9e5ebdfd1
2023-04-25 22:50:46 KST [teleport-installer] CA_PIN_HASHES: sha256:db4df64e05b10210e1d7a15881396e93f82d8e17004cf5f2757963b643987663
2023-04-25 22:50:46 KST [teleport-installer] Checking TCP connectivity to Teleport server (teleport.sangchul.kr:443)
2023-04-25 22:50:46 KST [teleport-installer] Connectivity to Teleport server (via nc) looks good
2023-04-25 22:50:46 KST [teleport-installer] Detected host: linux-gnu, using Teleport binary type linux
2023-04-25 22:50:46 KST [teleport-installer] Detected arch: x86_64, using Teleport arch amd64
2023-04-25 22:50:46 KST [teleport-installer] Detected distro type: debian
2023-04-25 22:50:46 KST [teleport-installer] Using Teleport distribution: deb
2023-04-25 22:50:46 KST [teleport-installer] Created temp dir /tmp/teleport-s9a19mtUOl
2023-04-25 22:50:46 KST [teleport-installer] Installing repo for distro ubuntu.
...
Get:14 https://apt.releases.teleport.dev/ubuntu jammy/stable/v12 amd64 Packages [8,761 B]
Fetched 3,152 kB in 4s (709 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  teleport
0 upgraded, 1 newly installed, 0 to remove and 42 not upgraded.
Need to get 130 MB of archives.
After this operation, 452 MB of additional disk space will be used.
Get:1 https://apt.releases.teleport.dev/ubuntu jammy/stable/v12 amd64 teleport amd64 12.2.4 [130 MB]
Fetched 130 MB in 12s (10.9 MB/s)
Selecting previously unselected package teleport.
(Reading database ... 116354 files and directories currently installed.)
Preparing to unpack .../teleport_12.2.4_amd64.deb ...
Unpacking teleport (12.2.4) ...
Setting up teleport (12.2.4) ...
...
No VM guests are running outdated hypervisor (qemu) binaries on this host.
2023-04-25 22:51:16 KST [teleport-installer] Found: Teleport v12.2.4 git:api/v12.2.4-0-g0f5a2d8 go1.20.3
2023-04-25 22:51:16 KST [teleport-installer] Writing Teleport node service config to /etc/teleport.yaml

A Teleport configuration file has been created at "/etc/teleport.yaml".
To start Teleport with this configuration file, run:

teleport start --config="/etc/teleport.yaml"

Happy Teleporting!
2023-04-25 22:51:16 KST [teleport-installer] Host is using systemd
2023-04-25 22:51:16 KST [teleport-installer] Starting Teleport via systemd. It will automatically be started whenever the system reboots.
Created symlink /etc/systemd/system/multi-user.target.wants/teleport.service → /lib/systemd/system/teleport.service.

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 'node-02'
Find more details on how to use Teleport here: https://goteleport.com/docs/user-manual/

t3
t4

728x90

클라이언트 PC(mac)

클라이언트 프로그램 설치

t5

curl -s -O https://cdn.teleport.dev/teleport-12.2.4.pkg
sudo installer -pkg teleport-12.2.4.pkg -target /
$ which teleport
/usr/local/bin/teleport
tsh login --proxy=teleport.sangchul.kr:443 --user=testuser1 --insecure
$ tsh login --proxy=teleport.sangchul.kr:443 --user=testuser1 --insecure
Enter password for Teleport user testuser1:
Enter your OTP token:
> Profile URL:        https://teleport.sangchul.kr:443
  Logged in as:       testuser1
  Cluster:            teleport.sangchul.kr
  Roles:              access, editor
  Logins:             root, ubuntu, vagrant
  Kubernetes:         enabled
  Valid until:        2023-04-26 10:58:02 +0900 KST [valid for 12h0m0s]
  Extensions:         login-ip, permit-agent-forwarding, permit-port-forwarding, permit-pty, private-key-policy

mac 터미널에서 node-02 서버 접근

tsh ssh vagrant@node-02
$ tsh ssh vagrant@node-02
vagrant@node-02:~$

 

728x90