Open bpmct opened 2 years ago
FWIW: I just discovered https://github.com/JinnLynn/dockerfiles/blob/master/sshping/Dockerfile. The repo is MIT licensed. Thanks @JinnLynn
The jinnlynn/sshping
image works well.
Usage note: am (only) mapping the SSH_AUTH_SOCK
environment variable, allowing smartcard authentication through the local ssh-agent
's socket file. Without a volume for ~/.ssh/config
the container doesn't know about per-hostname usernames/aliases though, but that's alright with me.
Below is an SSH_AUTH_SOCK
example for sshping
against user@server.example
.
docker run \
--rm \
--init \
--name sshping \
-v "${SSH_AUTH_SOCK}:/tmp/ssh.sock:ro" \
--env SSH_AUTH_SOCK='/tmp/ssh.sock' \
jinnlynn/sshping \
--verbose --human-readable user@server.example
A
sshping
container could be used to benchmark SSH connections without installinglibssh-dev
and building sshping on a local machine.For example:
I'm not sure fi this is possible, and may not work with all hosts/networks however.