On the BSD box, you need to place the public key in ~${bsd.user}/.ssh/authorized_keys and make sure the permissions are correct. Directory ~${bsd.user}/.ssh should be 700 and the public key and authorized_keys file should be 644 or 600. Your issue really has more to do with SSH than Ant.
-Rob Anderson > -----Original Message----- > From: Karunakar Chatla [mailto:[EMAIL PROTECTED] > Sent: Monday, September 26, 2005 4:31 AM > To: Ant Users List > Subject: Exception while executing SSHEXEC Task > > > Hi, > > I want to run some command on FreeBSD box from windows box. > I am using SSHEXEC task for achieving this. > > My script looks something like this : > <sshexec host="${bsd.host}" > username="${bsd.user}" > keyfile="${key.file}" > trust="true" > command='chmod +w > "${bsd.dartmail.path}/common/inc/freeBsd/shareLibs/UnixVersion.h"' > output="${output.folder.path}\ssh.log" > failonerror="true"/> > > I am able to execute this script if I use password property > instead of keyfile property. I am getting following exception > when executed with keyfile property : > > build-freebsd.xml:84: com.jcraft.jsch.JSchException: Auth cancel > > I have created DSA key pairs on FreeBSD box using ssh-keygen tool. > Copied the id_dsa (private key) to windows box and set the > path of this file to key.file property in properties file. > > Is there anything more to be done? > Any ideas on this?? > > Thanks, > Karunakar Chatla > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]