Search code examples
linuxdockerjenkinsjenkins-agent

Jenkins SSH-authenticated node on non-standard port


Is it possible to configure a Jenkins ssh node (slave) to authenticate on a port which is different than 22?

After choosing “Launch method” to be “Launch slave agents via SSH”, it is possible to enter the host on which we want to configure node. However there is no “port” field anywhere around, and syntax “ip:port” doesn’t want to work either.

After setting host field to ip:port, Jenkins tries to connect to ip:port:22

Opening SSH connection to IP:PORT:22.

IP:PORT: invalid IPv6 address

Any tips? Or is it necessary to just stick to using the standard ssh port? The reason for wanting to use different ssh port is using Docker container on a remote machine.


Solution

  • Jenkins - 2.89 with SSH slaves plugin

    If i understood your question correctly, you ignored advanced button on the new node config form via SSH slave plugin.

    Adding node -

    Add Node Click on Advanced & you should be able to define a port via GUI -

    enter image description here