Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.
/ ssh-agent-proxy Public archive

A Java library that talks to the local ssh-agent.

License

Notifications You must be signed in to change notification settings

spotify/ssh-agent-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ssh-agent-proxy

Build Status codecov Maven Central License

A Java library that talks to the local ssh-agent. This project is currently in beta phase.

Download

Download the latest JAR or grab via Maven.

<dependency>
  <groupId>com.spotify</groupId>
  <artifactId>ssh-agent-proxy</artifactId>
  <version>0.1.5</version>
</dependency>

Getting started

import org.apache.commons.codec.binary.Hex;

final byte[] dataToSign = {0xa, 0x2, (byte) 0xff};
final AgentProxy agentProxy = AgentProxies.newInstance();
final List<Identity> identities = agentProxy.list();
for (final Identity identity : identities) {
  if (identity.getPublicKey().getAlgorithm().equals("RSA")) {
    final byte[] signedData = agentProxy.sign(identity, dataToSign);
    System.out.println(Hex.encodeHexString(signedData));
  }
}

Prerequisities

Any platform that has the following

  • Java 7+
  • Maven 3 (for compiling)

Releasing

To cut the Maven release:

mvn clean [-B -Dinvoker.skip -DskipTests -Darguments='-Dinvoker.skip -DskipTests'] \
  -Dgpg.keyname=<key ID used for signing artifacts> \
  release:clean release:prepare release:perform

Code of conduct

This project adheres to the Open Code of Conduct. By participating, you are expected to honor this code.

About

A Java library that talks to the local ssh-agent.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages