Class ExecRemoteAgent
- java.lang.Object
-
- com.cloudbees.jenkins.plugins.sshagent.exec.ExecRemoteAgent
-
- All Implemented Interfaces:
RemoteAgent
public class ExecRemoteAgent extends Object implements RemoteAgent
An implementation that uses native SSH agent installed on a system.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addIdentity(String privateKey, String passphrase, String comment, TaskListener listener)
Adds the provided identity to the agent.String
getSocket()
Returns the value that the environment variable should be set to.void
stop(TaskListener listener)
Stops the agent.
-
-
-
Method Detail
-
getSocket
public String getSocket()
Returns the value that the environment variable should be set to.- Specified by:
getSocket
in interfaceRemoteAgent
- Returns:
-
addIdentity
public void addIdentity(String privateKey, String passphrase, String comment, TaskListener listener) throws IOException, InterruptedException
Adds the provided identity to the agent.- Specified by:
addIdentity
in interfaceRemoteAgent
- Parameters:
privateKey
- the private key.passphrase
- the passphrase ornull
.comment
- the comment to give to the key.listener
- for logging.- Throws:
IOException
- if something went wrong.InterruptedException
-
stop
public void stop(TaskListener listener) throws IOException, InterruptedException
Stops the agent.- Specified by:
stop
in interfaceRemoteAgent
- Parameters:
listener
- for logging.- Throws:
IOException
InterruptedException
-
-