ant scp 端口_强大的 ant scp 和 sshexec

这篇博客展示了如何利用antscp和sshexec工具执行一系列远程文件操作,包括创建目录、备份文件、权限设置以及文件上传。通过示例脚本,演示了如何在SSH连接中执行命令,如文件覆盖确认、权限变更以及目录和文件的交互操作。
摘要由CSDN通过智能技术生成

# re: 强大的 ant scp 和 sshexec   回复  更多评论

2008-12-24 16:24 by G_G

message="输入(ssh/ 下文件名 \n\r 上载或覆盖 到服务器 218 ${ssh.path} ):">

message="请确定是否使用 ssh/${scp_coverage_shell_file} 覆盖服务器中 ${ssh.host}:${ssh.path}${scp_coverage_shell_file} (y,n)"

validargs="y,n" addproperty="do.coverage" defaultvalue="n" />

退出

password="${ssh.myPass}" trust="true"

command="

mkdir -p ${ssh.path}backup/${TODAY} ;

if [ -f ${ssh.path}${scp_coverage_shell_file} ] ;

then

cp ${ssh.path}${scp_coverage_shell_file} ${ssh.path}backup/${TODAY}/ ;

fi ;

">

todir="${ssh.myName}:${ssh.myPass}@${ssh.host}:${ssh.path}"

trust="true" verbose="true" />

password="${ssh.myPass}" trust="true"

command="chmod 777 ${ssh.path}${scp_coverage_shell_file}">

defaultvalue="*">

password="${ssh.myPass}" trust="true"

command="ls /data/meganotes/shell/${show_shell_file}">

message="输入 /data/meganotes/shell/ 下需要文件名(cp 到 ssh 下):">

file="${ssh.myName}:${ssh.myPass}@${ssh.host}:/data/meganotes/shell/${scp_shell_file}"

todir="ssh" trust="true" verbose="true" />

password="${ssh.myPass}" trust="true" command="${ssh.adminRunLog}">

password="${ssh.myPass}" trust="true"

command="${ssh.scheduleRunLog}">

password="${ssh.myPass}" trust="true" command="${ssh.64k}">

password="${ssh.myPass}" trust="true" command="${ssh.128k}">

password="${ssh.myPass}" trust="true"

command="${ssh.128kto64k.err}">

message="测试类输入(Video*Test):" defaultvalue="*Test">

value="${basedir}/sh/admin_test.bat ${admin_test_input} " />

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值