ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy Lambert <anto...@gmx.de>
Subject Re: Issue in SCP using jsch
Date Mon, 18 Feb 2013 14:42:40 GMT
Hello Farrooq,

this is more a question for the ant user list.

You are mentioning a .pem file, this implies that you are trying to use private/public key
authentication.

I am not sure whether the ssh task of ant can use .pem files. It can use "id_dsa" or "id_rsa"
files (private ssh keys) when the public key of the user initiating the communication is present
under .ssh/authorized_keys at the remote end of the connection.

Are you able to do a manual ssh connection (with the ssh or plink command line client) using
this .pem file ?

Regards,

Antoine


On Feb 7, 2013, at 7:08 AM, Muddassir Farooq wrote:

> Hi all
> 
> i am facing the following issue when i run scp task of ant using .pem file.
> SSH access is successful otherwise.
> 
>          com.jcraft.jsch.JSchException: Auth fail
>        at com.jcraft.jsch.Session.connect(Session.java:491)
>        at com.jcraft.jsch.Session.connect(Session.java:162)
>        at
> org.apache.tools.ant.taskdefs.optional.ssh.SSHBase.openSession(SSHBase.java:223)
>        at
> org.apache.tools.ant.taskdefs.optional.ssh.Scp.upload(Scp.java:324)
>        at
> org.apache.tools.ant.taskdefs.optional.ssh.Scp.execute(Scp.java:226)
>        at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
>        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>        at java.lang.reflect.Method.invoke(Method.java:601)
>        at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
>        at org.apache.tools.ant.Task.perform(Task.java:348)
>        at org.apache.tools.ant.Target.execute(Target.java:390)
>        at org.apache.tools.ant.Target.performTasks(Target.java:411)
>        at
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
>        at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
>        at
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
>        at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
>        at org.apache.tools.ant.Main.runBuild(Main.java:809)
>        at org.apache.tools.ant.Main.startAnt(Main.java:217)
>        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
>        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
> 
> Ant Version in use: Apache Ant(TM) version 1.8.2 compiled on December 20
> 2010
> Ant Version in use: jsch-0.1.49.jar
> 
> Please advise on urgent bases.
> 
> -- 
> *Muhammad Muddassir Farooq*
> Sr.  SCM Engineer
> 
> <http://www.iscrybe.com/>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message