Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/liamg/sshotp
Enter passwords to commands non-interactively
https://github.com/liamg/sshotp
non-interactive password ssh sshpass
Last synced: 2 months ago
JSON representation
Enter passwords to commands non-interactively
- Host: GitHub
- URL: https://github.com/liamg/sshotp
- Owner: liamg
- Created: 2019-03-19T13:22:18.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-24T18:13:35.000Z (almost 2 years ago)
- Last Synced: 2024-10-10T18:26:05.181Z (3 months ago)
- Topics: non-interactive, password, ssh, sshpass
- Language: Go
- Size: 2.74 MB
- Stars: 9
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SSHOTP: Automatic entry of non-interactive passwords
Autopass is essentially a go implementation of [sshpass](https://linux.die.net/man/1/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
```bash
go get -u github.com/liamg/sshotp
```## Example
```bash
sshotp --password mypassword123 "ssh [email protected] -p 2222"
```## Usage
```
Usage:
sshotp [flags]Flags:
--disable-ssh-host-confirm sshotp will automatically confirm the authenticity of SSH hosts unless this option is specified
--env use value of $SSHOTP environment variable as password
-h, --help help for autopass
--password string plaintext password (not recommended)
--timeout duration timeout length to wait for prompt/confirmation (default 10s)
```