Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Problem automating sFTP transfer using script in cron Post 302431123 by robbien on Monday 21st of June 2010 03:40:38 AM
Old 06-21-2010
Thanks very much for the help i have now successfully tested a script:

Code:
sftp user@host.com <<EOF
lcd LOCALFOLDER
put FILE.TXT
quit
EOF

This done the job for
Thanks again
SmilieSmilieSmilieSmilieSmilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

automating sftp script

I have to write an automated sftp script which uses password authentication method to access the remote server. I want to pass the password as a parameter or to be included in the script itself, so that when i run the sftp script, it should not prompt me to enter the password. Thanks in advance... (1 Reply)
Discussion started by: Rajeshsu
1 Replies

2. Shell Programming and Scripting

How to transfer files (By using generic script) when using sftp

I have written generic script to transfer files from one machine to other machine(By passing the command line arguments like server name, user name ,location of the files, file names etc) but when i am using sftp, what are the things I have to specify in the code Is it necessary to specify... (0 Replies)
Discussion started by: gsri
0 Replies

3. UNIX for Dummies Questions & Answers

cron ? automating a script

Hi all. basically i need to run a script every 30 minutes. my script is simply an error report: errpt thats it, is there anyway to make this happen every 30 minutes without having to type errpt in, the script will get bigger as i add more things to do but just need to know how to... (8 Replies)
Discussion started by: hassanj
8 Replies

4. Solaris

Issues with automating SFTP

Hi We are trying to set up a non-interactive sftp to one of our clients to be able to transfer files to them. For the setup I logged into server1 as user1 and generated RSA public and private keys id_rsa and id_rsa.pub. Then I did an sftp to server2 as user2 and put the id_rsa.pub in the .ssh... (4 Replies)
Discussion started by: vnparo
4 Replies

5. Shell Programming and Scripting

Automating file transfer between two SSH enabled server.

Hi Experts, Few more words to the title, both the servers are ssh enabled but I have read only access to the second server, so I cannot automate SFTP process using RSA/DSA keys. I am using Control M to trigger the script and do not want any manual intervention to enter the password to complete... (4 Replies)
Discussion started by: nchourasiya
4 Replies

6. Shell Programming and Scripting

Shell script to transfer file via SFTP

Hi all, I'm trying to do a script to transfer file between my server and an external server via SFTP protocol. It doesn't use rsa key, but password. When I run the script, it throw back a prompt that request me to put the password. How should I do for automatic login? Pleaes help :( ... (2 Replies)
Discussion started by: Kapom
2 Replies

7. Shell Programming and Scripting

Sftp : not able to print the echo statements after the sftp transfer

I had the below sftp script working perfectly but the problem is I am not able to send the echo statements . #!/bin/sh echo "Starting to sftp..." sftp admin@myip << END_SCRIPT cd /remotepath/ lcd /localpath/ mget myfiles*.csv bye END_SCRIPT echo "Sftp successfully." echo echo... (11 Replies)
Discussion started by: scriptscript
11 Replies

8. UNIX for Dummies Questions & Answers

Execution problem with Cron: Script works manually but not w/Cron. Why?

Hello gurus, I am making what I think is a simple db2 call from within a shell script but I am having difficulty producing the desired report when I run the script shown below from a shell script in cron. For example, my script and the crontab file setup is shown below: #!/bin/ksh db2... (3 Replies)
Discussion started by: okonita
3 Replies

9. Shell Programming and Scripting

Shell script, sftp logfile not showing transfer information

Hello, Recently I have changed some crontab scripts which I execute to do different tasks mainly transfering some files from one server to the other. The main change was the protocol from ftp transfer to sftp. Ftp server was the MS Windows default service, and Sftp server is an proprietary sw... (4 Replies)
Discussion started by: enux
4 Replies

10. UNIX for Beginners Questions & Answers

Execute a script after SFTP transfer

Hi All, I am having an issue with the script execution. I am having a SFTP process that send files to a location . I want to execute a script once it transfer the file to that location. Right now I am leveraging autosys file watcher to do that. Is there any way like MFT PPA that can execute... (2 Replies)
Discussion started by: arunkumar_mca
2 Replies
tftp(1) 						      General Commands Manual							   tftp(1)

NAME
tftp - trivial file transfer program SYNOPSIS
val] val] [host [port]] DESCRIPTION
is the user interface to the Internet TFTP (Trivial File Transfer Protocol), that allows users to transfer files to and from a remote machine. The remote host can be specified on the command line, in which case uses host as the default host for future transfers (see the command below). Note now conforms to the RFCs: 2347, 2348, and 2349. Options supports the following new options: Set the block size option for data transfer, in octets. See command for more information. Set the use of transfer size option. See command for more information. Set the retransmission timeout option, in seconds. See command for more information. Commands Once is running, it issues the prompt and recognizes the following commands: Set the host (and optionally port) for transfers. Note that the TFTP protocol, unlike the FTP protocol, does not maintain con- nections between transfers; thus, the command does not actually create a connection, but merely remembers what host is to be used for transfers. You do not have to use the command; the remote host can be specified as part of the or com- mands. Set the mode for transfers; transfer-mode can be one of or (default is Put a file or set of files to the specified remote file or directory. The destination can be in one of two forms: a filename on the remote host if the host has already been specified, or a string of the form to specify both a host and filename at the same time. If the latter form is used, the hostname spec- ified becomes the default for future transfers. If the remote-directory form is used, the remote host is assumed to be a UNIX-like machine. To invoke the command with an IPv6 address, the IPv6 address must be enclosed in a pair of square brackets Get a file or set of files from the specified sources. source can be in one of two forms: a filename on the remote host if the host has already been specified, or a string of the form to specify both a host and filename at the same time. If the latter form is used, the last hostname specified becomes the default for future transfers. To invoke the command with an IPv6 address, the IPv6 address must be enclosed in a pair of square brackets Exit Typing the end-of-file character also causes an exit. Toggle verbose mode. Toggle packet tracing. Show current status. Set the per-packet retransmission timeout, in seconds. Set the total transmission timeout, in seconds. Shorthand for "mode ascii" Shorthand for "mode binary" Set the block size for data transfer. The client and the server communicate to arrive upon a block size that is suitable for use on the network medium. The valid range is 8 to 65464 octets. The default value is 512 octets. Set the retransmission timeout, in seconds. The client and the server communicate to arrive upon a retransmission timeout value. The valid range is 1 to 255 seconds. The default value is 5 seconds. Toggles the use of transfer size. This option is implemented for binary mode transfers only. By default, this option is disabled. If this option is enabled, it allows the receiving side to deter- mine the size of the file being transferred. When the command is used in binary mode and the size of the file is greater than the free disk space, transfer will be aborted immediately. When the command is used in binary mode, the size of the file will be sent to the server. Print help information. WARNINGS
Since there is no user-login or validation within the TFTP protocol, the remote site probably has some sort of file-access restrictions in place. The exact methods are specific to each site and are therefore difficult to document here. AUTHOR
was developed by the University of California, Berkeley. SEE ALSO
tftpd(1M). tftp(1)
All times are GMT -4. The time now is 10:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy