Gentoo Archives: gentoo-user

From: LiangYun Gong <kit393@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] SCP bash script
Date: Thu, 03 May 2012 15:54:57
Message-Id: CAJk+umyQrsamA-T1sbjvz1q_SJ6kaa3Q-UVkMiXGcGFBvZAREw@mail.gmail.com
In Reply to: Re: [gentoo-user] SCP bash script by Adam Carter
1 Right, I am just not sure that's the only way. Since I just want to copy
2 one file in and one file out on many servers, this solution will double the
3 work. It's just for servers auditing, you know.
4
5 But thanks a lot anyway. Appreciate you help. :-)
6
7 On Thu, May 3, 2012 at 9:20 PM, Adam Carter <adamcarter3@×××××.com> wrote:
8
9 > On Thu, May 3, 2012 at 9:44 PM, LiangYun Gong <kit393@×××××.com> wrote:
10 > > Hi guys,
11 > >
12 > > I have a problem with scp bash script. I was trying to automate scp
13 > command
14 > > to copy files in and out, and I was trying to avoid key in the password
15 > > myself.
16 > >
17 > > So I attempt to use the "here string" feature of bash, it didn't work
18 > with
19 > > scp.
20 > >
21 > > And those server I am working with, they don't have expect package
22 > > installed. :-(
23 > >
24 > > ps. I am not supposed to change the configuration of the servers(
25 > includes
26 > > setup openssh keys, or install expect)
27 >
28 > Typically you would copy local:~/.ssh/id_dsa.pub (or non dsa
29 > equivalent) into remote:~/.ssh/authorized_keys - since that's only
30 > user level, no need for root access. Its changing the configuration of
31 > the user on the remote machine, but since that user is you, its
32 > usually ok.
33 >
34 > You then use -i with scp.
35 >
36 >