1 |
On Thu, May 3, 2012 at 9:44 PM, LiangYun Gong <kit393@×××××.com> wrote: |
2 |
> Hi guys, |
3 |
> |
4 |
> I have a problem with scp bash script. I was trying to automate scp command |
5 |
> to copy files in and out, and I was trying to avoid key in the password |
6 |
> myself. |
7 |
> |
8 |
> So I attempt to use the "here string" feature of bash, it didn't work with |
9 |
> scp. |
10 |
> |
11 |
> And those server I am working with, they don't have expect package |
12 |
> installed. :-( |
13 |
> |
14 |
> ps. I am not supposed to change the configuration of the servers( includes |
15 |
> setup openssh keys, or install expect) |
16 |
|
17 |
Typically you would copy local:~/.ssh/id_dsa.pub (or non dsa |
18 |
equivalent) into remote:~/.ssh/authorized_keys - since that's only |
19 |
user level, no need for root access. Its changing the configuration of |
20 |
the user on the remote machine, but since that user is you, its |
21 |
usually ok. |
22 |
|
23 |
You then use -i with scp. |