Hello!
Architecture:
Jenkins installed on server A is trying to connect to server B which has public IP 46.X.X.X and internal IP 192.168.98.181.
The public IP has the SSH on port 221 and the internal one on port 22.
Using the settings in the screenshots below when I test the connection in the control panel it connects successfully but when I try to do the same thing in a job, it doesn’t work and returns the error below: