Configuring Jenkins Slave in Docker Image on AWS Host

I’m trying to figure out how to launch a Jenkins slave running
off a docker image that runs on my Linux AMI (AWS) so it’s Centos based.

My objective is to use it to demo the https:_//

this is a current demo on the docker main site that unfortunately doesn’t go into enough detail in setting things up
and is also maybe dated/deprecated as to the current jenkins version.

firstly the simplest approach…

If I try “launch agent via Java Web Start” it doesn’t connect to host at port 50000 which is open on the host

but in the demo they do… launch slave agents via SSH


put as the host

under credentials -> add -> Kind

the choices are:

-docker host certificate authorization
-SSH username with private key
-Secret file
-Secret Text

so I have an EC2.pem file which is PEM or Privacy Enhanced Mail is a Base64 encoded DER certificate
this is how with PuttyGen ( creates a ppk file off the pem file ) I connect to the Linux ami (centos) server.
and installed jenkins through docker cs engine.

So trying to select it as a Secret file then launching the Slave yeilds the following error…

[04/07/17 18:04:54] [SSH] Opening SSH connection to
/var/jenkins_home/.ssh/known_hosts [SSH] No Known Hosts file was found at /var/jenkins_home/.ssh/known_hosts. Please ensure one is created at this path and that Jenkins can read it.
Key exchange was not finished, connection is closed. There was a problem while connecting to
at com.trilead.ssh2.Connection.connect(
at com.trilead.ssh2.Connection.connect(
at com.trilead.ssh2.Connection.connect(
at hudson.plugins.sshslaves.SSHLauncher.openConnection(
at hudson.plugins.sshslaves.SSHLauncher$
at hudson.plugins.sshslaves.SSHLauncher$
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$
Caused by: Key exchange was not finished, connection is closed.
at com.trilead.ssh2.transport.KexManager.getOrWaitForConnectionInfo(
at com.trilead.ssh2.transport.TransportManager.getConnectionInfo(
at com.trilead.ssh2.Connection.connect(
… 9 more
Caused by: The server hostkey was not accepted by the verifier callback
at com.trilead.ssh2.transport.KexManager.handleMessage(
at com.trilead.ssh2.transport.TransportManager.receiveLoop(
at com.trilead.ssh2.transport.TransportManager$
… 1 more
[04/07/17 18:04:54] Launch failed - cleaning up connection
[04/07/17 18:04:54] [SSH] Connection closed.

Is there any guide as to how to configure a jenkins slave on linux ?