| Also adding an empty-port entry to known_hosts file fixes the issue. To reproduce this case, just change the SSH port to default (on the server), connect at least once, to add have entry added to known_hosts file. Then change SSH port to whatever you want and Jenkins stops refusing to connect. This is a bug. The port is ignored by plugin when trying to find entry in known_hosts file. |