Sponsored Content
Top Forums Shell Programming and Scripting Not the usual ftp script question Post 70149 by kduffin on Tuesday 26th of April 2005 10:49:46 AM
Old 04-26-2005
The following script doesn't match your problem exactly as I was using ssh/scp with RSA key equivalency between the hosts, but it should illustrate a possible method.

Code:
for i in `ssh -p 22 user@host find /some/path/to/files/ -name ! *.done -mmin +1`; do
        /usr/local/bin/scp -P 22 user@host:$i /where/I/want/the/files
        /usr/local/bin/ssh -p 22 user@host mv -f $i ${i}.done
done

The same idea could be extened into a script with ftp.

Cheers,

Keith
 

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

FTP - shell script question

Hi All, I had a question on something which i have trying to add to my current shell script which does FTP of files from my local machine to a remote server. I have 5 files which i zip and FTP them on daily basis to a remote server. My script is as below: ############################... (6 Replies)
Discussion started by: bsandeep_80
6 Replies

2. Shell Programming and Scripting

perl or bash script that will generate a higher than usual load

Hi, please advise what function in perl or system call in shell that will generate cpu usage that is higher than usual? I would like make such a script, to test a monitoring feature. TIA. Marc (1 Reply)
Discussion started by: marcpascual
1 Replies

3. Shell Programming and Scripting

Automated FTP script using .netrc to multiple FTP servers

Hi all, I'm using the following script to automated ftp files to 1 ftp servers host=192.168.0.1 /usr/bin/ftp -vi >> $bkplog 2>&1 <<ftp open $host bin cd ${directory} put $files quit ftp and the .netrc file contain machine 192.168.0.1 login abc... (4 Replies)
Discussion started by: varu0612
4 Replies

4. Programming

Java double subtraction oddity (not the usual rounding discrepancy)

I've been going through a java tutorial, and ran across some strangeness in this small example... class SqrRoot { public static void main(String args) { double num,sroot,rerr,resquare; for(num = 1.0; num < 100.0; num++) { sroot = Math.sqrt(num); ... (1 Reply)
Discussion started by: Trones
1 Replies

5. Shell Programming and Scripting

repeating ftp script question

so i got this request to do this: - Script should check for the file ever 15 minutes on the FTP server…if the file is not found, then the whole script exits. File will only be created one a week at random. i have gotten this far, but am kind of stuck, also sleep command doesnt work... (3 Replies)
Discussion started by: zapatur23
3 Replies

6. Solaris

Copy via samba on vmware workstation with Solaris taking much longer than usual

i have a vmware workstation with solaris 10 installed on this. i copying 2 gb data via samba from windows to this vmware workstation. copy speed is 24 kb/sec. how i can speed up this copy process ? (7 Replies)
Discussion started by: rehantayyab82
7 Replies
ssh-keysign(1M) 														   ssh-keysign(1M)

NAME
ssh-keysign - ssh helper program for host-based authentication SYNOPSIS
ssh-keysign ssh-keysign is used by ssh(1) to access the local host keys and generate the digital signature required during host-based authentication with SSH protocol version 2. This signature is of data that includes, among other items, the name of the client host and the name of the client user. ssh-keysign is disabled by default and can be enabled only in the global client configuration file /etc/ssh/ssh_config by setting Host- basedAuthentication to yes. ssh-keysign is not intended to be invoked by the user, but from ssh. See ssh(1) and sshd(1M) for more information about host-based authen- tication. /etc/ssh/ssh_config Controls whether ssh-keysign is enabled. /etc/ssh/ssh_host_dsa_key /etc/ssh/ssh_host_rsa_key These files contain the private parts of the host keys used to generate the digital signature. They should be owned by root, readable only by root, and not accessible to others. Because they are readable only by root, ssh-keysign must be set-uid root if host-based authentication is used. ssh-keysign will not sign host-based authentication data under the following conditions: o If the HostbasedAuthentication client configuration parameter is not set to yes in /etc/ssh/ssh_config. This setting cannot be overri- den in users' ~/.ssh/ssh_config files. o If the client hostname and username in /etc/ssh/ssh_config do not match the canonical hostname of the client where ssh-keysign is invoked and the name of the user invoking ssh-keysign. In spite of ssh-keysign's restrictions on the contents of the host-based authentication data, there remains the ability of users to use it as an avenue for obtaining the client's private host keys. For this reason host-based authentication is turned off by default. See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWsshu | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ ssh(1), sshd(1M), ssh_config(4), attributes(5) AUTHORS
Markus Friedl, markus@openbsd.org HISTORY
ssh-keysign first appeared in Ox 3.2. 9 Jun 2004 ssh-keysign(1M)
All times are GMT -4. The time now is 06:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy