[olug] simple script
Jack
jdunn110 at cox.net
Sun Jun 18 23:15:35 UTC 2006
Sean,
Thanks for the tip. The scp command works just fine. I'm still
wrestling with Mandriva to convince it to accept RSA keys for the
script. It seems to have an ideosyncratic protocol for locating them.
I'll keep working on it.
But scp did help.
Thanx,
Jack
Subject:
Re: [olug] Simple local network script
From:
Sean Kelly <smkelly at zombie.org>
Date:
Sat, 17 Jun 2006 20:58:34 -0500
To:
Omaha Linux User Group <olug at olug.org>
On Sat, Jun 17, 2006 at 08:23:08PM -0500, Jack wrote:
>> Sorry to bother you guys (and gals?), but I could use a simple script
>> for the following:
>>
>> I am using sftp to move files from one computer to another in my
>> home network. I use MandrivaLinux 2006 on both machines.
>> I always enter in the same commands on the same machine. The
>> commands are:
>>
>> sftp 192.168.1.214
>> (then I put in the password and when I am in the sftp shell I type:)
>> put /home/jd/Sneakernet/* /home/jd/Sneakernet
>> bye
>
>
First off, you could be using `scp` instead of `sftp`. SCP is a
non-interactive way to copy files with SSH. So, you'd change the above by
doing:
$ scp /home/jd/Sneakernet/* @192.168.1.214:/home/jd/Sneakernet
As for eliminating the password, I'd suggest you look into building a new
SSH key without a password. This article describes it:
http://www.linuxjournal.com/article/8600
So, as for a simple shell script... Something along the lines of:
--SNIP--
#!/bin/sh
/usr/bin/scp ~jd/Sneakernet/* @192.168.1.214:~jd/Sneakernet/
--SNIP--
-- Sean Kelly | PGP KeyID: D2E5E296 smkelly at zombie.org |
http://www.zombie.org
More information about the OLUG
mailing list