ssh-key-exchange (ske) changes the way you set up key-based ssh communication between two or more computers. ske performs all the necessary steps that you must perform before key-based authentication can begin.
- ske generates the necessary private and public key for the computer on which ske is started (it also takes an existing key pair).
- ske connects to the remote computer via a password and adds the public key to the authorized keys
- then ske checks whether the key-based authentication works or not
- you can define a range of remote computers for which key-based authentication should be set up
- at the end a short report is generated
for the local environment (os and architecture)
make build
or (for all possible environments)
make build-all
You can try out the different options of ske with:
ssh-key-exchange -h
For testing ske you can use a tiny ssh-server from docker-hub
# first terminal
docker run --rm --publish=2222:22 --name ssh-server-local sickp/alpine-sshd:latest
# second terminal
## generating (you have to specify the password)
ssh-key-exchange --host 127.0.0.1 --port 2222 --user root --rsaKeyGenerate
## ssh shell key-based
ssh -o StrictHostKeyChecking=no root@127.0.0.1 -p 2222
Stopping the ssh-server as follows:
docker stop ssh-server-local
You can also just download the latest release from here.