SSH Script For Automatic File Upload HELP


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting SSH Script For Automatic File Upload HELP
# 1  
Old 08-27-2014
SSH Script For Automatic File Upload HELP

Hi guys!

I hope this hasn't been asked too many times but,

Would someone be able to help me write or point me in the direction to some helpful tutorials in order to write a script to transfer a file directly to a server via SSH from a linux based computer.
The script should do as following:

1. Open the secure shell
2. Auto login
3. Copy the file to the server/address
4. Disconnect ssh
5. Wait 15minutes
6. repeat (go to step 1)


Any help is greatly appreciated.

Regards

Craig
# 2  
Old 08-27-2014
First thing would be, if possible, set-up a passwordless login to the destination server
then, everything else can be done using simple shell script
else, you have to go with expect script or something else
# 3  
Old 08-27-2014
When passwordless login is set up, you could use scp (secure cp, member of the ssh family) to copy the files.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Html upload file to bash script

I am trying to upload a file to the server using bash script in html form. <FORM NAME="FORM1" METHOD="post" enctype="multipart/form-data" ACTION="/cgi-bin/UPLOAD.sh"> <INPUT type="file" name="DOCFILE" id="DOCFILE" accept=".jpg,.tif,.pdf"> </FORM> How can I able to access the file in... (8 Replies)
Discussion started by: Naz
8 Replies

2. UNIX for Dummies Questions & Answers

Retrieve/download SSH key instead of Send/Upload?

Hi, is it possible to download/retrieve a public SSH key when you are logged in to the remote machine rather than sending the key, for example with ssh-copy-id from your local machine to the remote machine? I can only ssh into one direction (from the remote machine into the local machine),... (5 Replies)
Discussion started by: gczychi
5 Replies

3. Shell Programming and Scripting

HTML code upload text file grep through shell script

I am looking for HTML code that browse text file and grep with database file then retrieve result txtfileuploaded contain 112233 115599 113366 shell code grep -F -f txtfileuploaded /data/database.txt result 112233 Mar 41$ 115599 Nov 44$ 113366 Oct 33$ attached... (2 Replies)
Discussion started by: phpshell
2 Replies

4. Shell Programming and Scripting

Script to upload latest file to other server via FTP

Hello, I have a script that finds the latest version of a file in a folder on my Minecraft server. I'm trying to come up with something that will then FTP that file over to my fileserver. Here's what I have that finds the newest file: find /home/mc/archive/sbhouse -type f -mtime +45 -exec... (7 Replies)
Discussion started by: nbsparks
7 Replies

5. Solaris

Automatic startup of SSH at reboot ?

hi friends, any idea how do we configure a automatic startup of SSH services in Solaris boot ? (5 Replies)
Discussion started by: Exposure
5 Replies

6. Shell Programming and Scripting

ftp put in shell script -- whole file doesn't upload

Hi I'm having some trouble with a bash shell script that I'm writing. In the script, I'm trying to upload a file to a backup repository using ftp, but the whole file doesn't get uploaded. This is the file's properties at the start (I've highlighted the file size in red): -rw-r--r-- 1 root... (2 Replies)
Discussion started by: Viola
2 Replies

7. Solaris

Script for automatic count the file i have

Hi I have a folder will all the file ftp in everyday. I have to go in every morning to check to see everynight have all the 2000+ file have been all FTP in. so every morning i will check like this # ls -l *_20080904*_20080904* |wc if there is 2714 that mean is correct. File name:... (13 Replies)
Discussion started by: summerpeh
13 Replies

8. Shell Programming and Scripting

automatic ssh into remote server using ksh

I still have to enter the password when I want to auto login w/o having to do any command line entry. This code works but I don't want to have to enter the password at the command line. After manning ssh I still am not sure what settings I need to change. Please help. Thanks! <<<output>>>... (4 Replies)
Discussion started by: tekline
4 Replies

9. Shell Programming and Scripting

Need Shell Script to upload data from Text file to Oracle database

Hi Does any one have any idea on uploading the data using Unix Shell script from text file to Oracle database. Requirement:- 1. Need to connect to Oracle database from Unix Shell script. 2. Need to pick Text file from some location on Unix Box. 3. Need to upload the data from text file to... (6 Replies)
Discussion started by: chandrashekharj
6 Replies

10. Linux

SSH upload error

I am trying to upload a file using SSH . it gives me error "Encounteted 1 errors during the transfer" WHere do I see the error ? why am i getting it ? thanks :) (1 Reply)
Discussion started by: upirate
1 Replies
Login or Register to Ask a Question