Comments (7)
HI @jsundmannorberg,
In #64 I've included ssh-agent support based upon jsch-agent-proxy.
Once it is landed, you should be able to activate along the lines of this:
JSch jsch=new JSch();
IdentityRepository irepo = new AgentIdentityRepository(new SSHAgentConnector());
jsch.setIdentityRepository(irepo);
The empty SSHAgentConnector
class constructor will attempt to to use Java 16's JEP 380 if you are running on Java 16+, else it will fall back to trying to use the junixsocket library if it is on the classpath. There are also various constructors to manually specify a specific USocketFactory
instance (UnixDomainSocketFactory
or JUnixSocketFactory
, or even a custom implementation), as well as specifying the filesystem path of the ssh-agent's unix domain socket instead of trying to use the SSH_AUTH_SOCK
env variable.
I've not tested the PageantConnector
class since I am not a Windows user, but if it was working with the old jsch-agent-proxy, then I imagine it should still work now. Using it requires that the JNA library be included on the classpath.
Thanks,
Jeremy
from jsch.
Hi @jsundmannorberg,
When I have some free time, I may take a look at this and see what it would entail.
Out of curiosity, which components from the original jsch-agent-proxy would you require for your particular use cases?
- Do you only require the support for traditional ssh-agent? Or do you also need the support for Pageant?
- Do you require the integration support it provides with SSHJ & trilead-ssh2? Or do you require its support with JSch?
- Also If you require the traditional ssh-agent support, would you need support for it with Java versions prior to Java 16?
Thanks,
Jeremy
from jsch.
Hi Jeremy!
Thanks for looking at this (if you have time)! It would be incredibly useful to us.
- It would be great to support both ssh-agent and Pageant.
- We are using this fork of JSch, so that is what we need support for.
- For our use case we need to support older Java versions as well, definitely Java 11. And in the future we will also need support for Java 17.
Thanks!
Johan
from jsch.
Thanks @norrisjeremy for the amazingly fast response , this looks like exactly what we need!
from jsch.
@jsundmannorberg can you please test latest release 0.1.66 (should be available on maven central in the next 24 hours), if it fits your needs?
from jsch.
Absolutely, I will test it as soon as possible
from jsch.
Thanks again for the fast response, this works perfectly for our needs.
from jsch.
Related Issues (20)
- failed to parse public key error with successful connection HOT 3
- After upgrade from version 02.11 to 0.2.16 connections fail with: java.io.IOException: End of IO Stream Read HOT 8
- sftp server failed to read file HOT 4
- Support for rsa2048-sha256 Key exchange HOT 6
- Jenkins com.jcraft.jsch.JSchAlgoNegoFailException: Algorithm negotiation fail HOT 5
- Connecting to Euler server, executing write and execute scripts in one connection, memory error HOT 1
- Does JSCH support JDK17 HOT 4
- Specify certificate file in ssh connection HOT 1
- Exception During Authentication - IOException: End of IO Stream Read HOT 5
- Packet corrupt HOT 2
- "JSchException: key type ssh-rp is not supported" Error on adding identity HOT 3
- Multi-Release jar for Java8 HOT 2
- Android: DexMerge Failed HOT 10
- Remind issue #484 HOT 1
- Advice to securely connect to a 'special' remote host HOT 1
- how to write part of sftp file with ChannelSftp HOT 1
- A strange bug when use InPutStream and OutPutStream
- FATAL: Bad packet length 604 HOT 1
- ChannelSftp.put() throws SftpException on some Android devices HOT 1
- sftp server die thread blocking during sftp ls execution HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsch.