步骤: 1.到support.rsa.com下载apache的最新的nicsftpagent.sh文件模板,然后根据实际情况修改。
Nicsftpagent.sh文件需要修改的部分(红色部分)
=================================================
#!/bin/bash
#### Copyright Notice:
####
#### Copyright (c) 2007 Network Intelligence Corporation
####
#### Warning: This computer program is protected by copyright law and
#### international treaties. Unauthorized reproduction or distribution
#### of this program, or any portion of it, may result in severe civil
#### and criminal penalties, and will be prosecuted to the maximum
#### extent possible under the law.
####
#### RSA, The Security Division of EMC - Automated FTP/SCP/SFTP Script v2.7.11
####
###################
####
#### Begin User configuration
####
##########
########
######
####
#SILENT MODE
#produce no output to the console;
#set this to true when running from cron
#to reduce emails sent to root.
#SILENT=true
# Have the Solaris POSIX compliant binaries first in the path.
# The /usr/bin directory in Solaris doesn't have POSIX compliant
# binaries. This is particularly a problem for the awk command we are
# using. (ECE-138)
PATH=/usr/xpg6/bin:/usr/xpg4/bin:/usr/css/bin:$PATH
## Enter the hostname/IP address of the enVision machine to which you want to
## send the data files
ENVISION=128.168.100.201
## [改成envision IP]
## Enter the directories where the data files, which you need to send, exist. Separate
## multiple directories with a colon (:). This script must have read permissions
## to the directories.
## Example for multiple folders DATA_DIRECTORY=/var/log/:/var/log/audit
## The directory on the enVision box where the files should be written to. This directory
## is relative to the enVision/ftp_files directory. If the directory name contains a
## space it will need to be double escaped. For example, if the directory name is
## "name with spaces", the variable needs to be set to "name\ with\ spaces".
## TRANSFER_METHOD=SFTP/SCP/FTP
## Select the method used to transfer the files to enVision. SFTP is recommended.
## valid options are FTP, SFTP and SCP
TRANSFER_METHOD=SFTP
## 【默认是FTP,需要改为SFTP】
## Enter a username (ftp default: anonymous; SFTP/SCP default: nic_sshd)
## Enter a password (anonymous connections accept any password)
PASSWORD=default
## Enter the identity/private key file for the user specified above user
## default is $HOME/.ssh/id_rsa
IDENTITY=~/.ssh/id_rsa
## Enter the file matching specification. "*" will send any files in the directory. Separate
## multiplefielnames with a colon (:).
## Example for multiple files::
## FILESPEC=*.log:xyz.log
FILESPEC=*.log
#[修改此字段可以让这脚本读取指定的文件,如:改成 FILESPEC=test.txt,则脚本会把DATA_DIRECTORY字段定义的目录下的test.txt文件上传到指定目录]