Created
May 29, 2015 07:07
-
-
Save tklee1975/34d038ae2db511d650fc to your computer and use it in GitHub Desktop.
A simple script to test scp working correct by Cronjob
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| TIME_FILE=/etc/temp/datetime.txt | |
| USER=admin | |
| REMOTE_SERVER=192.168.0.1 | |
| REMOTE_PORT=22 | |
| REMOTE_PATH=/home/admin/temp | |
| # Make a file and then send to Lab server | |
| date > $TIME_FILE | |
| scp $TIME_FILE $USER@$REMOTE_SERVER:$REMOTE_PATH -p $REMOTE_PORT | |
| echo $TIME_FILE |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why you may use this testing script: