Hi, I am executing several sshexec tasks in my script. It is able to execute the commands but taking lot of time. Is this always the case or I am making any mistake? How can we minimize the time to execute ssh commands?
Your help is very much appreciated. Thanks in advance. Here is my script : <!-- Build FreeBSD components on FreeBSD box using Samba Share folder and SSH --> <target name="Build" depends="UpdateView,DeleteSambaShare"> <echo message="Executing build on FreeBSD box..." /> <sshexec host="${bsd.host}" username="${bsd.user}" keyfile="${ssh.key.file}" trust="true" command='chmod +w "${bsd.dartmail.path}/common/inc/freeBsd/shareLibs/UnixVersion.h"' output="${output.folder.path}\ssh.log" failonerror="true"/> <echo message="Updating build number..." /> <sshexec host="${bsd.host}" username="${bsd.user}" keyfile="${ssh.key.file}" trust="true" command='sed -e "s/Oct. 20, 2004/${time.year}-${time.mm}-${time.day}/g" "${bsd.dartmail.path}/common/inc/freeBsd/shareLibs/UnixVersion.h" |sed "s/792/${build.number}/g" > "${bsd.dartmail.path}/tmp.h"' output="${output.folder.path}\ssh.log" append="true" failonerror="true"/> <echo message="Moving temp file to UnixVersion.h..." /> <sshexec host="${bsd.host}" username="${bsd.user}" keyfile="${ssh.key.file}" trust="true" command='mv "${bsd.dartmail.path}/tmp.h" "${bsd.dartmail.path}/common/inc/freeBsd/shareLibs/UnixVersion.h"' output="${output.folder.path}\ssh.log" append="true" failonerror="true"/> <echo message="Cleaning package folders..." /> <sshexec host="${bsd.host}" username="${bsd.user}" keyfile="${ssh.key.file}" trust="true" command='rm -rf "${bsd.dartmail.path}/bin/AliasDaemon_*" | rm -rf "${bsd.dartmail.path}/bin/QueueDaemon_*" | rm -rf "${bsd.dartmail.path}/bin/CgiBin_*"' output="${output.folder.path}\ssh.log" append="true" failonerror="true"/> <echo message="Calling make to build components..." /> <sshexec host="${bsd.host}" username="${bsd.user}" keyfile="${ssh.key.file}" trust="true" command='cd "${bsd.dartmail.path}" ; make -f "${bsd.dartmail.path}/Makefile" clean all' output="${output.folder.path}\ssh.log" append="true" failonerror="true"/> <echo message="Successfully Built FreeBSD components" /> </target> Thanks, Karunakar Chatla