How to access your server anywhere without SSH
Magesh Babu

Magesh Babu @mage1k99

About: Full stack Web Developer | Android enthusiast

Location:
Chennai, Tamilnadu
Joined:
Jun 5, 2020

How to access your server anywhere without SSH

Publish Date: Nov 23 '21
7 0

How to access your server anywhere without SSH.

Use cases

  • You want to have temporary access of your server from a remote location

  • You don't want to authorize a key to connect via ssh


OK now lets get into the process.

Prerequisites

  • root access
  • A Linux machine with ports 3023, 3024, 3025, and 443 open
  • A registered domain name
  • An SSH client like OpenSSH.
  • 2FA App

Download and installing Teleport

Teleport website

  • Click getting started, and select the community edition

Choosing community edition

  • Select acconding your platform, for me its Ubuntu 18.04 LTS, so I select the Linux 64-bit DEB version 8.0

Copy the link to download

  • Now login to your server via ssh, and download teleport using wget by running wget https://get.gravitational.com/teleport_8.0.0_amd64.deb

After downloading teleport using teleport

  • Install the deb package by sudo apt install ./teleport_8.0.0_amd64.deb

Installing Deb

  • Configure your domain for SSL certificate
sudo teleport configure --acme --acme-email=your-email@example.com --cluster-name=tele.example.com -o /etc/teleport.yaml
Enter fullscreen mode Exit fullscreen mode

Note if you already have reverse proxy servers running at port 443 you needed to edit it and change the port (/etc/teleport.yaml) [Included at last step].

  • Now start the teleport sudo systemctl start teleport.service

  • Add user with

tctl users add teleport-admin --roles=editor,access --logins=root,ubuntu,ec2-user
Enter fullscreen mode Exit fullscreen mode
  • It will give you a url to access the teleport

  • Follow the steps in the webpage to activate


For users with port address being used by other process

  • Open the config file in /etc/teleport.yaml
  • Go to the line where
web_listen_addr: 0.0.0.0:443
public_addr: tele.example.com:443
Enter fullscreen mode Exit fullscreen mode
  • Change the port address there

  • reload teleport service by sudo systemctl restart teleport.service


for more about installation documentation checkout

Comments 0 total

    Add comment