A groovy script to disable the built-in sshd server in Jenkins
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Drop this into init.groovy.d so that it gets executed at startup time. | |
// One could also use this script to explicitly set a port. | |
def inst = Jenkins.getInstance() | |
def sshDesc = inst.getDescriptor("org.jenkinsci.main.modules.sshd.SSHD") | |
sshDesc.setPort(-1) | |
sshDesc.getActualPort() | |
sshDesc.save() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment