[ 
https://issues.apache.org/jira/browse/VFS-451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13551769#comment-13551769
 ] 

Marco Ronchi commented on VFS-451:
----------------------------------

1. Changing line 106 within SftpClientFactory (JSCH 0.1.48)
from 
 jsch.addIdentity(privateKeyFile.getAbsolutePath());
to
 jsch.addIdentity(privateKeyFile.getAbsolutePath(),new String(password));

2. removing lines from 142 to 145.

Authentication works


                
> Auth Fails using private key
> ----------------------------
>
>                 Key: VFS-451
>                 URL: https://issues.apache.org/jira/browse/VFS-451
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 2.0
>         Environment: windows as client
> linux as ssh server
>            Reporter: Marco Ronchi
>         Attachments: RunMe.java
>
>
> Cannot connect to a ssh server with my private key.
> I believe the issue is due to an JSCH bug.
> Using the following lines: 
>      session.setPassword(pass);
>      jsch.addIdentity(identityfile);
> instead of
>      jsch.addIdentity(privateKeyFilePath,password);
> authentication fails.
>       
>       

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to