Sponsored Content
Top Forums Shell Programming and Scripting SFTP script to automate login in to remote server Post 302822967 by giovannym on Tuesday 18th of June 2013 12:36:41 PM
Old 06-18-2013
SFTP script to automate login in to remote server

Greetings, guys. I'm not much of a programmer forgive me for being a noob, because of someone leaving, I was put in an IT spot where I have to figure out a few things. Being new to Linux and programming has been a challenge.

My boss has asked me to create an automated script to connect to a 3rd party vendor to transfer files automatically on a set day of the month. Unfortunately, the problem is that the 3rd party does NOT use or allow the use of SSH Key exchanges, so I'm stuck trying to make use of automating the sFTP program. I read somewhere there is an non-interactive mode but I was hoping I could pick the brains of some of you guys, which are so much more experienced than I. I appreciate all answers in advance.

Gio
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Use cURL in shell script and get most recent file from remote server using SFTP

I have been trying to implement the following shell script -- sftp to remote server get list of files in the directory sftp get the most recent listed file exit This script will be scheduled to be executed everyday using CRON or CONTROL-M and the need is to have absolutely no human... (7 Replies)
Discussion started by: toobrown1
7 Replies

2. Shell Programming and Scripting

How to automate sftp without using expect script?

How to automate sftp with out using expect script? My batch file has the password but it is not taking. Please see below. I want to use this sftp connection in a loop for pushing new files in a directory one at a time. Hence I can not use an expect script. bash-2.05$... (5 Replies)
Discussion started by: Tuxidow
5 Replies

3. Programming

SFTP from one remote server to another remote server from desktop

Hi, I have 1. lappy 2. server A 3. server B Now, what i need is to run a command from lappy that will sftp a file from server A to server B. Please guide me to achieve this. -akash (1 Reply)
Discussion started by: akash.mahakode
1 Replies

4. Red Hat

Chroot sftp users, remote sftp login shows wrong timestamp on files

Hello, I have a weird issue, I have RHEL 5.7 running with openssh5.2 where sftpgroup OS group is chroot. I see the difference difference in timestamp on files, when I login via ssh and SFTP, I see four hour difference, is something missing in my configuration. #pwd... (8 Replies)
Discussion started by: bobby320
8 Replies

5. Shell Programming and Scripting

i want to execute shell script on remote server with in sftp session

Hi, I want to execute shell script with in sftp session for remote server. like i have a shell script test.sh that is on local server.i want to execute that script on remote server sftp user@192.168.56.10 sftp> test.sh ---execute for remote server not for local server. sftp... (3 Replies)
Discussion started by: SAUD PASHA
3 Replies

6. UNIX for Dummies Questions & Answers

Automate sftp process using script

Hi, guys, I am trying to automate a sftp process using "expect" method (since the key authentication method is disabled in my company network, there is no helping it). In order to try, I type in the command manually: sftp @ > << EOF >cd >ls -l >EOF >Connecting to @servername password: ... (3 Replies)
Discussion started by: warmboy610
3 Replies

7. HP-UX

Connect to remote server using sftp with password define within command/script

I am trying to connect to remote server in hp-ux, using sftp command (using sftp username@ip and password ) able to connect to remote server but, in this case sftp prompt for password and user need to manually enter it. I want sftp can read a password define in script or from file, so it can... (1 Reply)
Discussion started by: ketanraut
1 Replies

8. Solaris

Script to get files from remote server to local server through sftp without prompting for password

Hi, I am trying to automate the process of fetching files from remote server to local server through sftp. I have the username and password for the remote solaris server. But I need to give password manually everytime i run the script. Can anyone help me in automating the script such that it... (3 Replies)
Discussion started by: ssk250
3 Replies

9. Shell Programming and Scripting

Running a script on remote server kills my login session

Hi there, I'm trying to run a script remotely on a server in a particular directory named after hostname which already exists, my login session gets killed as soon as I run the below command. Not sure what is wrong, is there a better way to do it ? Note: I can also use nohup command to run... (14 Replies)
Discussion started by: mbak
14 Replies
freshclam(1)							  Clam AntiVirus						      freshclam(1)

NAME
freshclam - update virus databases SYNOPSIS
freshclam [options] DESCRIPTION
freshclam is a virus database update tool for ClamAV. OPTIONS
Freshclam reads its configuration from freshclam.conf. The settings can be overwritten with command line options. -h, --help Output help information and exit. -V, --version Print version number and exit. -v, --verbose Be verbose. This option causes freshclam to print much additional information. --debug Enable debug messages from LibClamAV. --quiet Be quiet - output only error messages. --no-warnings Don't print and log warnings. --stdout Write all messages to stdout. --config-file=FILE Read configuration from FILE. -l FILE, --log=FILE Log report to FILE. -d, --daemon Run in a daemon mode. Defaults to 12 checks per day unless otherwise specified by --checks or freshclam.conf. -p FILE, --pid=FILE Write daemon's pid to FILE. -u USER, --user USER Run as USER. By default (when started by root) freshclam drops privileges and operates as the '' user. --no-dns This option forces old non-DNS verification method (without a TTL delay). -c #n, --checks=#n Check #n times per day for a new database. #n must be between 1 and 50. --datadir=DIRECTORY Install new database in DIRECTORY. The directory must be writable for the '' user or unprivileged user running freshclam. --daemon-notify=/path/to/clamd.conf Notify the daemon about the new database. By default it reads a hardcoded config file but you can use a different one. Both local and TCP sockets are supported. -a IP, --local-address=IP Use (local) IP for HTTP downloads. Useful for multi-homed systems. If binding fails for whatever reason, a warning is issued and freshclam behaves like without this flag. --on-update-execute=COMMAND Execute COMMAND after successful update. --on-error-execute=COMMAND Execute COMMAND if error occurred. Remember, that virus database freshness is the most important thing in anti-virus system. With this option freshclam can alert you (eg. send SMS) when something is going wrong. --on-outdated-execute=COMMAND Execute COMMAND when freshclam reports outdated version. In the command string %v will be replaced by the new version number. --list-mirrors Print mirror details from mirrors.dat (cache file for the mirror manager). --submit-stats[=/path/to/clamd.conf] Upload detection statistics to the ClamAV Project (see freshclam.conf(5):SubmitDetectionStats for more details). No database update will be performed. This option only works in the interactive mode. --update-db=DBNAME With this option you can limit updates to a subset of database files. The DBNAME should be "main", "daily", "bytecode", "safebrows- ing" or one of the 3rd party database names. This option can be used multiple times and only works with the official and 3rd party databases distrubuted through the ClamAV mirrors, your custom databases (specified with DatabaseCustomURL in freshclam.conf) will not be ignored. --enable-stats Enable submission of statistical data. --stats-host-id=UUID HostID in the form of an UUID to use when submitting statistical information. EXAMPLES
(0) Download database to default directory: freshclam (1) Download database to current directory: freshclam --datadir=. (2) Run as a daemon and check 2 times per day for new database: freshclam -d -c 2 RETURN CODES
Some return codes of freshclam can be overwritten with a built-in command EXIT_n which can be passed to --on-*-execute, eg. --on-update-execute=EXIT_1 will force freshclam to always return 1 after successful database update. 0 : Database is up-to-date or successfully updated. 40: Unknown option passed. 50: Can't change directory. 51: Can't check MD5 sum. 52: Connection (network) problem. 53: Can't unlink file. 54: MD5 or digital signature verification error. 55: Error reading file. 56: Config file error. 57: Can't create new file. 58: Can't read database from remote server. 59: Mirrors are not fully synchronized (try again later). 60: Can't get information about '' user from /etc/passwd. 61: Can't drop privileges. 62: Can't initialize logger. FILES
/etc/clamav/freshclam.conf CREDITS
Please check the full documentation for credits. AUTHOR
Tomasz Kojm <tkojm@clamav.net>, Kevin Lin <klin@sourcefire.com> SEE ALSO
freshclam.conf(5), clamd(8), clamd.conf(5), clamscan(1) ClamAV 0.98.4 December 4, 2013 freshclam(1)
All times are GMT -4. The time now is 04:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy