打包好web应用时,有时候上传也是比较烦琐,ant需要jsch.jar,可以到SourceForge:jsch,把它放到ant能找到地方,可以放到ANT_HOME/lib下。
然后写target:
- <target name="copy.to.remote" depends="war">
- <scp file="${build.dir}/${project.name}.war" todir="${scp.username}:${scp.passwd}@${scp.host}:${scp.path}" port="22" trust="true" verbose="true"></scp>
- </target>
延伸:
•使用时报 com.jcraft.jsch.JSchException: reject HostKey: 192.168.0.123。是没有加 trust=”true”,把它加上就好了。
•在 eclipse 中加 ant 额外的lib:首选项->Ant->Runtime->ClassPath->Global Entries,添加额外的jar
If you use ssh as remote login service, use following command to find out all failed login attempts via ssh or telnet (don’t use telnet):
Use grep command to find out authentication failure message from /var/log/messages file
Use awk and cut command to print IPs/hostname
Use sort command to sort them
Use uniq command to print total failed login attempts
继续阅读 »
SSH offers a highly secure channel for remote administration of servers. However, if you face an audit for regulatory or business requirements, such as Visa/Mastercard PCI, you need to be aware of some potential authentication related short-comings that may cause headaches in an audit. For example:
- There is no way to control which users have public key authorization
- There is no way to enforce passphrase complexity (or even be sure that one is being used)
- There is no way to expire a public key 继续阅读 »
N次了,这个问题,这次一定要让自己记住,debian无愧于它的名字,普通方法是搞不定滴。
昨天更新gtk,搞坏了桌面,无奈用fvwm代替。今天启动发现竟然又自己启动到图形模式了,可是登录后桌面依然无法显示。 继续阅读 »
In this tutorial we will are going to provide simple procedure how to to perform UDP tunneling through an SSH connection.Say you need to forward UDP packets between two remote networks securely.
E.g : dns queries from your home machine to your dns servers at work. 继续阅读 »