Skip to content
This repository has been archived by the owner on May 11, 2023. It is now read-only.
/ ts-trail Public archive

A program that uploads Tailscale SSH session recordings to an S3 bucket

License

Notifications You must be signed in to change notification settings

Doist/ts-trail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ts-trail

Command ts-trail uploads Tailscale SSH session recordings to an S3 bucket. It deletes uploaded files.

This tool only works on Linux, and assumes that “tailscaled” process runs under systemd. Tested with Tailscale v1.26.1.

Setup

This program is primarily targeted for use in AWS environment, so it relies on AWS SDK credentials discovery logic. It only needs s3:PutObject permission to upload recordings.

To build from the source, you need to have Go installed.

Then you can either:

  1. Clone this repository, cd into the clone directory and run

    GOOS=linux GOARCH=amd64 go build
    

    Adjust GOARCH for your target architecture. The resulting ts-trail binary will be in your current directory.

  2. Install it like by running

    GOOS=linux GOARCH=amd64 go install github.com/Doist/ts-trail@latest
    

    Adjust GOARCH for your target architecture. The resulting binary can be found under your $GOBIN directory if it's configured, or under the $HOME/go/bin otherwise. Notice that if the target OS/architecture differs from the current, the binary will be stored under a subdirectory named like linux_amd64, so the full path will be something like $HOME/go/bin/linux_amd64/ts-trail.

Copy the binary to the target host, and run it there in self-install mode:

AWS_REGION=us-east-1 ./ts-trail -bucket=myBucketName -install

Adjust the S3 bucket name and AWS region.

The -install flag makes it copy itself to the canonical location, and configures/launches systemd service.

About

A program that uploads Tailscale SSH session recordings to an S3 bucket

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages