Using the CLI over SSH Authentication In a new Jenkins installation, the SSH service is disabled by default. Administrators may choose to set a specific port or ask Jenkins to pick a random port in the Configure Global Security page. In order to determine the randomly assigned SSH port, inspect the headers returned on a Jenkins URL, for example: With the random SSH port ( 53801  in this example), and Authentication configured, any modern SSH client may securely execute CLI commands. Whichever user used for authentication with the Jenkins master must have the  Overall/Read permission in order to  access  the CLI. The user may require additional permissions depending on the commands executed. Authentication relies on SSH-based public/private key authentication. In order to add an SSH public key for the appropriate user, navigate to  JENKINS_URL/user/USERNAME/configure  and paste an SSH public key into the appropriate text area. 168 % curl -Lv https://JENKINS_URL/login 2>&1 | grep 'X-SSH-Endpoint' < X-SSH-Endpoint: localhost:53801 %