#!/bin/sh
#==========================================================
#This script is used to login in ftp server automatically
#to check out whether the server is running.
#==========================================================
#Version 1.0\2009-11-02\by zhengyu
#Any question can be email to
#==========================================================
function autoftp.sh()
{
username="shalin"
password="shalin"
Erorrnum=100
if [ "$1" = "" ] ;
then
echo "Please add the ip address of the ftp Server after autoftp.sh"
echo "Example: autoftp.sh 192.168.1.1"
exit $Eroornum
else
echo -e "open $1
user $username $password
binary
dir
bye
"|ftp -n
fi
}
autoftp.sh $1
exit 0
这个脚本可以在备份的时候用,自动把一些文件传送到FTP服务器上;或者可以检测FTP服务器是否正常运行。
当FTP服务没有运行的时候,是不能登录到FTP服务器上的。
但是,在运行的时候出现如下的信息:
Please login with USER and PASS.
Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Google了一下,也没有很好的解释,如果谁能够解释一下,就最好了。
阅读(837) | 评论(2) | 转发(0) |