Categorygithub.com/admpub/teleport
modulepackage
2.7.0+incompatible
Repository: https://github.com/admpub/teleport.git
Documentation: pkg.go.dev

# README

Gravitational Teleport

Gravitational Teleport is a modern SSH server for remotely accessing clusters of Linux servers via SSH or HTTPS. It is intended to be used instead of sshd for organizations who need:

  • SSH audit with session recording/replay.
  • Easily manage SSH trust between teams, organizations and data centers.
  • SSH into behind-firewall clusters without any open ports.
  • Role-based access control (RBAC) for SSH protocol.

In addition to its hallmark features, Teleport is interesting for smaller teams because it facilitates easy adoption of the best SSH practices like:

  • No need to distribute keys: Teleport uses certificate-based access with automatic certificate expiration time.
  • 2nd factor authentication (2FA) for SSH.
  • Collaboratively troubleshoot issues through session sharing.
  • Single sign-on (SSO) for SSH and your organization identities via OpenID Connect or SAML with endpoints like Okta or Active Directory.
  • Cluster introspection: every SSH node and its status can be queried via CLI and Web UI.

Teleport is built on top of the high-quality Golang SSH implementation and it is fully compatible with OpenSSH and can be used with sshd servers and ssh clients.

Project LinksDescription
Teleport WebsiteThe official website of the project
DocumentationAdmin guide, user manual and more
Demo Video3-minute video overview of the UI.
TeleconsoleThe free service to "invite" SSH clients behind NAT, built on top of Teleport
BlogOur blog where we publish Teleport news

Installing and Running

Download the latest binary release, unpack the .tar.gz and run sudo ./install. This will copy Teleport binaries into /usr/local/bin.

Then you can run Teleport as a single-node cluster:

$ sudo teleport start 

In a production environment Teleport must run as root. But to play, just do chown $USER /var/lib/teleport and run it under $USER, in this case you will not be able to login as someone else though.

Building Teleport

Teleport source code consists of the actual Teleport daemon binary written in Golang, and also it has a web UI (located in /web directory) written in Javascript. The WebUI is not changed often and we keep it checked into Git under /dist, so you only need to build Golang:

Make sure you have Golang v1.8.3 or newer, then run:

# get the source & build:
$ mkdir -p $GOPATH/src/github.com/gravitational
$ cd $GOPATH/src/github.com/gravitational
$ git clone https://github.com/gravitational/teleport.git
$ cd teleport
$ make full

# create the default data directory before starting:
$ sudo mkdir -p /var/lib/teleport
$ sudo chown $USER /var/lib/teleport

If the build succeds the binaries will be placed in $GOPATH/src/github.com/gravitational/teleport/build

NOTE: The Go compiler is somewhat sensitive to amount of memory: you will need at least 1GB of virtual memory to compile Teleport. 512MB instance without swap will not work.

Rebuilding Web UI

To enable speedy iterations on the Web UI, teleport can load the web UI assets from the source directory. To enable this behavior, set the environment variable DEBUG=1 and rebuild with the default target:

$ make

# Run Teleport as a single-node cluster in development mode: 
$ DEBUG=1 ./build/teleport start -d

Keep the server running in this mode, and make your UI changes in /dist directory. Refer to web/README.md for instructions on how to update the Web UI.

Why did We Build Teleport?

Mature tech companies with significant infrastructure footprints tend to implement most of these patterns internally. Teleport allows smaller companies without significant in-house SSH expertise to easily adopt them, as well. Teleport comes with an accessible Web UI and a very permissive Apache 2.0 license to facilitate adoption and use.

Being a complete standalone tool, Teleport can be used as a software library enabling trust management in complex multi-cluster, multi-region scenarios across many teams within multiple organizations.

More Information

Contributing

The best way to contribute is to create issues or pull requests right here on Github. You can also reach the Gravitational team through their website

Is Teleport Secure and Production Ready?

Teleport has completed several security audits from the nationally recognized technology security companies. Some of them have been made public. We are comfortable with the use of Teleport from a security perspective.

However, Teleport is still a relatively young product so you may experience usability issues. We are actively supporting Teleport and addressing any issues that are submitted to this repo. Ask questions, send pull requests, report issues and don't be shy! :)

The latest stable Teleport build can be found in Releases

Known Issues

  • Teleport does not officially support IPv6 yet.

Who Built Teleport?

Teleport was created by Gravitational Inc. We have built Teleport by borrowing from our previous experiences at Rackspace. It has been extracted from Telekube, our Kubernetes distribution optimized for deploying and remotely controlling complex applications into multiple environments at the same time:

  • Multiple cloud regions
  • Colocation
  • Private enterprise clouds located behind firewalls

# Packages

No description provided by the author
integration package tests Teleport on a high level creating clusters of servers in memory, connecting them together and connecting to them.
No description provided by the author
No description provided by the author

# Functions

Component generates "component:subcomponent1:subcomponent2" strings used in debugging.
NewRoles return a list of roles from slice of strings.
ParseRoles takes a comma-separated list of roles and returns a slice of roles, or an error if parsing failed.

# Constants

ADFS is Microsoft Active Directory Federation Services.
DefaultRole is the name of the default admin role for all local users if another role is not explicitly assigned (Enterprise only).
APIDomain is a default domain name for Auth server API.
AuthorizedKeys are public keys that check against User CAs.
CertExtensionPermitAgentForwarding allows agent forwarding for certificate.
CertExtensionPermitPortForwarding allows user to request port forwarding.
CertExtensionPermitPTY allows user to request PTY.
CertExtensionTeleportRoles is used to propagate teleport roles.
CertificateFormatOldSSH is used to make Teleport interoperate with older versions of OpenSSH.
CertificateFormatStandard is used for normal Teleport operation without any compatibility modes.
CertificateFormatUnspecified is used to check if the format was specified or not.
ComponentAuditLog is audit log component.
ComponentAuth is the cluster CA node (auth server API).
ComponentAuthority is a TLS and an SSH certificate authority.
ComponentCachingClient is a caching auth client.
ComponentClient is a client.
ComponentConnectProxy is the HTTP CONNECT proxy used to tunnel connection.
ComponentDiagnostic is a diagnostic service.
ComponentDynamoDB represents dynamodb clients.
ComponentNode is SSH node (SSH server serving requests).
ComponentKeyAgent is an agent that has loaded the sessions keys and certificates for a user connected to a proxy.
ComponentKeyGen is the public/private keypair generator.
ComponentKeyStore is all sessions keys and certificates a user has on disk for all proxies.
ComponentLocalTerm is a terminal on a regular SSH node.
ComponentNode is SSH node (SSH server serving requests).
Component pluggable authentication module (PAM).
ComponentProcess is a main control process.
ComponentProxy is SSH proxy (SSH server forwarding connections).
ComponentRemoteSubsystem is subsystem on a forwarding SSH node.
ComponentRemoteTerm is a terminal on a forwarding SSH node.
ComponentReverseTunnel is reverse tunnel agent that together with server establish a bi-directional SSH revers tunnel to bypass firewall restrictions.
ComponentReverseTunnelServer is reverse tunnel server that together with agent establish a bi-directional SSH revers tunnel to bypass firewall restrictions.
ComponentSession is an active session.
ComponentSubsystemProxy is the proxy subsystem.
ComponentTunClient is a tunnel client.
ComponentUpload is a session recording upload server.
ConnectorGithub means connector type Github.
ConnectorOIDC means connector type OIDC.
ConnectorSAML means connector type SAML.
DataDirParameterName is the name of the data dir configuration parameter passed to all backends during initialization.
DebugEnvVar tells tests to use verbose debug output.
DefaultImplicitRole is implicit role that gets added to all service.RoleSet objects.
DefaultTerminalHeight defines the default height of a server-side allocated pseudo TTY.
DefaultTerminalWidth defines the default width of a server-side allocated pseudo TTY.
DirMaskSharedGroup is the mask for a directory accessible by the owner and group.
DurationNever is human friendly shortcut that is interpreted as a Duration of 0.
FileMaskOwnerOnly is the file mask that allows read write access to owers only.
ForeverTTL means that object TTL will not expire unless deleted.
Github means authentication will happen remotely using a Github connector.
HOTP means HMAC-based One-time Password Algorithm.for Two-Factor Authentication.
HTTPProxy is an environment variable pointing to a HTTP proxy.
HTTPSProxy is an environment variable pointing to a HTTPS proxy.
HumanDateFormat is a human readable date formatting.
HumanDateFormatMilli is a human readable date formatting with milliseconds.
HumanDateFormatSeconds is a human readable date formatting with seconds.
JSON means JSON serialization format.
SSH request type to keep the connection alive.
KnownHosts are public keys that check against Host CAs.
this constant exists for backwards compatibility reasons, needed to upgrade to 2.3.
LinuxAdminGID is the ID of the standard adm group on linux.
LinuxOS is the name of the linux OS.
Local means authentication will happen locally within the Teleport cluster.
LogsDir is a log subdirectory for events and logs.
MaxEnvironmentFileLines is the maximum number of lines in a environment file.
NetIQ is an identity provider.
Off means mode is off.
OFF means no second factor.for Two-Factor Authentication.
OIDC means authentication will happen remotely using an OIDC connector.
On means mode is on.
OTP means One-time Password Algorithm for Two-Factor Authentication.
RecordingProxyReqType is the name of a global request which returns if the proxy is recording sessions or not.
RemoteClusterStatusOffline indicates that cluster is considered as offline, since it has missed a series of heartbeats.
RemoteClusterStatusOnline indicates that cluster is sending heartbeats at expected interval.
RemoteCommandFailure is returned when a command has failed to execute and we don't have another status code for it.
RemoteCommandSuccess is returned when a command has successfully executed.
RoleAdmin is admin role.
RoleAuth is for teleport auth server (authority, authentication and authorization).
RoleNode is a role for SSH node in the cluster.
RoleNop is used for actions that already using external authz mechanisms e.g.
RoleProvisionToken is a role for nodes authenticated using provisioning tokens.
RoleProxy is a role for SSH proxy in the cluster.
RoleRemoteProxy is a role for remote SSH proxy in the cluster.
RoleSignup is for first time signing up users.
RoleTrustedCluster is a role needed for tokens used to add trusted clusters.
RoleWeb is for web access users.
Root is *nix system administrator account name.
SafeTerminalType is the fall-back TTY type to fall back to (when $TERM is not defined).
SAML means authentication will happen remotely using a SAML connector.
SchemeFile is a local disk file storage.
SchemeS3 is S3 file scheme, means upload or download to S3 like object storage.
SCP is Secure Copy.
SessionEvent is sent by servers to clients when an audit event occurs on the session.
SharedDirMode is a mode for a directory shared with group.
SSHAgentPID is the environment variable pointing to the agent process ID.
SSHAuthSock is the environment variable pointing to the Unix socket the SSH agent is running on.
SSHSessionID is the UUID of the current session.
SSHSessionWebproxyAddr is the address the web proxy.
SSHTeleportClusterName is the name of the cluster this node belongs to.
SSHTeleportHostUUID is the UUID of the host.
SSHTeleportUser is the current Teleport user that is logged in.
Syslog is a mode for syslog logging.
TOTP means Time-based One-time Password Algorithm.
TOTPSkew adds that many periods before and after to the validity window.
TOTPValidityPeriod is the number of seconds a TOTP token is valid.
TraitInternalPrefix is the role variable prefix that indicates it's for local accounts.
TraitInternalRoleVariable is the role variable used to store allowed logins for local accounts.
TraitLogins is the name the role variable used to store allowed logins.
U2F means Universal 2nd Factor.for Two-Factor Authentication.
VerboseLogEnvVar forces all logs to be verbose (down to DEBUG level).
No description provided by the author
WebAPIVersion is a current webapi version.

# Variables

Gitref variable is automatically set to the output of git-describe during the build process.

# Type aliases

Role identifies the role of an SSH connection.
No description provided by the author