# Use a "local" jenkins ssh agent without globally declare it

**URL:** <https://community.jenkins.io/t/use-a-local-jenkins-ssh-agent-without-globally-declare-it/9558>\
**Category:** Using Jenkins\
**Created:** [September 12, 2023, 1:13pm UTC](https://community.jenkins.io/t/use-a-local-jenkins-ssh-agent-without-globally-declare-it/9558 "2023-09-12T13:13:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![c3p0-maif](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/c3p0-maif/32/5473_2.png) [@c3p0-maif](https://community.jenkins.io/u/c3p0-maif)\
**Post date:** [September 12, 2023, 1:13pm UTC](https://community.jenkins.io/t/use-a-local-jenkins-ssh-agent-without-globally-declare-it/9558/1 "2023-09-12T13:13:41Z")

</div>

I manage a Jenkins instance and a client want to use a private agent to run their builds.

Do you know a plugin which allow this without declare the SSH Agent on Jenkins General Configuration ?

Purpose / Constraints :

- No one except them should be able to see/use this private agent
- They want to be autonome to change the server config (adress, workspace dir, ssh key, …)

Example of usage :

```auto
pipeline {
    agent {
        ssh {
            address '192.168.0.10'
            credentials 'my-cred-id'
            workspace '/tmp/workspace'
            ...
        }
    }
    stages {
        stage('Example') {
            steps {
                echo 'Hello World'
            }
        }
    }
}

```

---

<div class="post-metadata">

**Author:** ![slide\_o\_mix](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/slide_o_mix/32/20977_2.png) [@slide\_o\_mix](https://community.jenkins.io/u/slide_o_mix)\
**Post date:** [September 12, 2023, 3:06pm UTC](https://community.jenkins.io/t/use-a-local-jenkins-ssh-agent-without-globally-declare-it/9558/2 "2023-09-12T15:06:17Z")

</div>

I don’t think there is anything like this currently in Jenkins. You could just have them run ssh and pass a script to run, but otherwise I don’t think there is a “cleaner” solution.
