Closed pyotr777 closed 10 years ago
If you have succeeded to ssh from host A to host B with jsch-agent-proxy, it may not be a problem of jsch-agent-proxy. Does Trilead support the agent forwarding?
Thank you, Yamanaka-san, for your answer. I have tried different examples as described here: https://github.com/ymnk/jsch-agent-proxy. JSchWithAgentProxy worked, SshjWithAgentProxy failed, TrileadWithAgentProxy failed.
I get no errors while compiling examples. I suppose you did some testing before placing examples in Readme. What are the SSH settings these examples are supposed to work with?
Kind regards, Peter
SshjWithAgentProxy failed, TrileadWithAgentProxy failed.
What kind of failures do you have? Have you failed to ssh from host A to host B with jsch-agent-proxy?
It fails to connect from B to C. I've put maven output for TrileadWithAgentProxy example in the first post. Agent forwarding is not working. Here is SSH output:
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /home/user/.ssh/id_rsa
debug1: Trying private key: /home/user/.ssh/id_dsa
debug1: Trying private key: /home/user/.ssh/id_ecdsa
debug1: Next authentication method: password
debug1: read_passphrase: can't open /dev/tty: No such device or address
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
debug1: read_passphrase: can't open /dev/tty: No such device or address
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
debug1: read_passphrase: can't open /dev/tty: No such device or address
debug1: Authentications that can continue: publickey,password
debug1: No more authentication methods to try.
Permission denied (publickey,password).
This output is produced on host B, when connecting to host C. Does this mean Trilead and Sshj do not support agent forwarding?
Does this mean Trilead and Sshj do not support agent forwarding?
We don't know about those libraries. Those examples demonstrate how to use them with jsch-agent-proxy, and examples are not for the agent forwarding.
I have set up SSH login with agent proxy from my desktop (A) to host B, and from B to C.
When i type on A:
ssh -A user@addressB
and on B:ssh -A user@addressC
it works OK: I can login to C.Unfortunately, TrileadWithAgentProxy example does't work for me. Authentication from B to C fails, because Java is trying to find a key file on B, i.e. agent forwarding is not working.
All I get is:
By the way, on host B I set up Force Command to automatically login to C, so typing
ssh -A user@addressB
takes me right to the host C.Kind regards, Peter