LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-20-2008, 02:24 PM   #1
spaceuser
Member
 
Registered: Oct 2004
Location: Sweden
Distribution: Debian | Ubuntu | Mint | Android
Posts: 37

Rep: Reputation: 15
Need to copy file (scp) to Debian server when reached 150 kb


Hi!

I have a Linux router (Freesco) that runs on a floppy. I had it for years and it have worked very good. Until now, I have copied the router log files manually to my Debian server. I'd like to setup a script that will check if file is near 150 kb in size, and then logon to the server and copy the file to it, using scp. I guess I need to use cron that will run a script now and then. I have used the scp command before a few times, but never using the password within the command line if it's even possible, I don't know for sure. Would appreciate if anyone could give me a hint or two on this.

TIA

/Lars
 
Old 07-20-2008, 03:56 PM   #2
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Quote:
Originally Posted by spaceuser View Post
I have used the scp command before a few times, but never using the password within the command line if it's even possible, I don't know for sure. Would appreciate if anyone could give me a hint or two on this.
Rather than trying to use a password, you probably want to use public key authentication. This is explained in the ssh man page under the section AUTHENTICATION. There are also numerous articles on the Internet explaining it. Since this will be run automatically, you will need create your private key without a passphrase. Understand that this carries some security risk since anybody acquiring that key will be able to log onto your Debian server with it.

If you create the key pair from your Debian system, be sure the OpenSSH package is up-to-date since an out of date package might contain a horrible security hole that was discovered a few months back.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SCP: Copy file from remote linux server onto a windows machine? Tony Empire Linux - Newbie 21 09-22-2015 10:18 PM
scp does not copy to a server??? malo_umoran Slackware 3 11-24-2006 04:13 AM
SCP Copy File SSH petenyce Linux - Wireless Networking 2 10-05-2005 03:11 PM
scp/ssh tail(multiple file) remote copy tpreitano Linux - General 1 08-22-2005 02:17 PM
scp :copy file from one remote comp to another aniketh Linux - Networking 4 06-16-2004 02:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration