Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile / container image #30

Open
bpmct opened this issue Jan 3, 2022 · 2 comments
Open

Dockerfile / container image #30

bpmct opened this issue Jan 3, 2022 · 2 comments

Comments

@bpmct
Copy link

bpmct commented Jan 3, 2022

A sshping container could be used to benchmark SSH connections without installing libssh-dev and building sshping on a local machine.

For example:

docker run -v $HOME/.ssh/:/root/.ssh` sshping -d myserver.com

I'm not sure fi this is possible, and may not work with all hosts/networks however.

@bpmct
Copy link
Author

bpmct commented Jan 3, 2022

FWIW: I just discovered https://github.com/JinnLynn/dockerfiles/blob/master/sshping/Dockerfile. The repo is MIT licensed. Thanks @JinnLynn

@joelpurra
Copy link

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 [email protected].

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 [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants