项目作者: liamg

项目描述 :
Enter passwords to commands non-interactively
高级语言: Go
项目地址: git://github.com/liamg/sshotp.git
创建时间: 2019-03-19T13:22:18Z
项目社区:https://github.com/liamg/sshotp

开源协议:

下载


SSHOTP: Automatic entry of non-interactive passwords

Autopass is essentially a go implementation of sshpass, though unlike sshpass it doesn’t restrict itself to SSH logins. It can supply a password to any process with an identifiable password prompt.

Do not use this unless you understand the risks involved - ssh prompts for a password interactively for a reason!

The original use case for this was needing to automate the acquisition and use of an SSH OTP (via vault) in a nice script.

Requirements

  • Mac/Linux
  • Go 1.11+ (to build)

Install

  1. go get -u github.com/liamg/sshotp

Example

  1. sshotp --password mypassword123 "ssh me@myserver.mine -p 2222"

Usage

  1. Usage:
  2. sshotp [flags]
  3. Flags:
  4. --disable-ssh-host-confirm sshotp will automatically confirm the authenticity of SSH hosts unless this option is specified
  5. --env use value of $SSHOTP environment variable as password
  6. -h, --help help for autopass
  7. --password string plaintext password (not recommended)
  8. --timeout duration timeout length to wait for prompt/confirmation (default 10s)