Giter Club home page Giter Club logo

onetouch-ssh's Introduction

Authy

OneTouch SSH

OneTouch SSH protects a users's SSH login via a OneTouch approval. If anyone tries to SSH with your account into a protected machine, you'll receive a OneTouch notification allowing you to Approve or Deny access.

If there is no response to the OneTouch request within a set time, your Authy registered device will instead request confirmation via an SMS delivered Authy OneCode.

Without OneTouch or SMS verification, access will not be granted.

Prerequisites

Install Go https://golang.org/doc/install and make sure both your GOROOT and GOPATH environmetal variables are set.

Create an SSH key

Open a terminal on your local computer and enter the following:
ssh-keygen -t rsa -C "[email protected]"
Just press <Enter> to accept the default location and file name
Enter, and re-enter, a passphrase when prompted.

This keypair should be saved in your ~/.ssh/ folder with the filename you chose.

Install OneTouch SSH

go get github.com/dcu/onetouch-ssh

Configure API key

Get an Authy key from your Authy dashboard.

The next step is to run this command to setup your environment.

onetouch-ssh init

Add Users

Type the following command:

onetouch-ssh add-user <email> <country code> <phone number> <public key>

NOTE: You can add keys in one of two ways.

File Path

onetouch-ssh add-user [email protected] 1 4155551234 ~/.ssh/id_rsa.pub

Pasted Key

onetouch-ssh add-user [email protected] 1 4155551234 ssh-rsa AAM8sBlW9CmrCQRFAAB3NzaC1yc2EAAHELPAADAQABAAABAQCyFQwZ2pVKfNS5iztqwaoNFaGpbLGvngQIMZgIsf+AUfGFt3c9Y4STUCKd0642miDvb6XPLINgAVPVJGzEZbZoU/+gUGGlNb+UNIVERSEFACTORY/NsE/sWqx2wuK93nvIoJXP7V+4jet9mKITt0B5aBH0mdmtY3AZS2JsksrzIcjDYldLwo+nIVFE4c4f+T7m9M8sBlW9CmrCQRF7nMbkVgSQ3Npt2IiMJaJ/1gWBxycSgMVMFiUS1Q2P3znUsBGp7p9CGssq02+NavML3sXFASyBSZ [email protected]

Next you can start adding the users using the form. Type Ctrl-c to finish.

Enable

To enable OneTouch for SSH just type:

onetouch-ssh enable

And that's it, you can try to ssh to the server.

Usage

When you try to connect to the ssh server it'll send you a push notification with a limited period of time to approve:

$ ssh ssh.server.com
Sending approval request to your device... [sent]

If the user doesn't approve the request before the time expires an Authy OneCode delivered via SMS is asked as a fallback.

$ ssh ssh.server.com
Sending approval request to your device... [sent]
You didn't confirm the request. A text-message was sent to your phone.
Enter security code:

Executing Commands

When you try to run commands it'll display info about the command, the server IP and client IP.

OneTouch

Git Integration

When you try to push or fetch from git it won't display anything but you'll receive a push notification in your phone with the info. The information includes the server IP, client IP, geo location, branch, repository name.

Troubleshooting

Make sure your key and AuthyID are listed in the authorized_keys file

cat ~/.ssh/authorized_keys

Make sure the users you want to allow access to are listed in your users.list

cat ~/.authy-onetouch/users.list

onetouch-ssh's People

Contributors

dcu avatar josh-authy avatar kolargol avatar pirogoeth avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.