Alpine based image provides ssh, oathtool (for generating TOTP tokens) and sshpass (a noninteractive ssh password provider) for automated ssh logins using time-based one-time password authentication.
Var | Description |
---|---|
OTP_SECRET Required |
TOTP seecret (SHA) |
OTP_PREFIX Optional |
Prefix for SSHPASS |
OTP_SUFFIX Optional |
Suffix for SSHPASS |
SSHPASS Generated |
Exposed at entrypoint. To be used with sshpass -e |
NTP_SERVER Required |
For backward compatibility default is set to time.google.com. This will be removed in a future release |
NTP_MAXOFFSET Optional |
Exit if time offset is > NTP_MAXOFFSET (ms). Set to Zero to disable ntp time comparison. Default: 20000 |
docker run \
--rm \
-e OTP_SECRET="" \
jb5r/sshpass-oathtool:latest \
sshpass -e ssh user@host <command>