* [gentoo-user] SCP bash script
@ 2012-05-03 11:44 LiangYun Gong
2012-05-03 13:20 ` Adam Carter
2012-05-04 0:28 ` Joshua Murphy
0 siblings, 2 replies; 4+ messages in thread
From: LiangYun Gong @ 2012-05-03 11:44 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 520 bytes --]
Hi guys,
I have a problem with scp bash script. I was trying to automate scp command
to copy files in and out, and I was trying to avoid key in the password
myself.
So I attempt to use the "here string" feature of bash, it didn't work with
scp.
And those server I am working with, they don't have expect package
installed. :-(
ps. I am not supposed to change the configuration of the servers( includes
setup openssh keys, or install expect)
You guys have any idea that can help this case?
Thanks & Regards,
kit393
[-- Attachment #2: Type: text/html, Size: 590 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] SCP bash script
2012-05-03 11:44 [gentoo-user] SCP bash script LiangYun Gong
@ 2012-05-03 13:20 ` Adam Carter
2012-05-03 15:52 ` LiangYun Gong
2012-05-04 0:28 ` Joshua Murphy
1 sibling, 1 reply; 4+ messages in thread
From: Adam Carter @ 2012-05-03 13:20 UTC (permalink / raw
To: gentoo-user
On Thu, May 3, 2012 at 9:44 PM, LiangYun Gong <kit393@gmail.com> wrote:
> Hi guys,
>
> I have a problem with scp bash script. I was trying to automate scp command
> to copy files in and out, and I was trying to avoid key in the password
> myself.
>
> So I attempt to use the "here string" feature of bash, it didn't work with
> scp.
>
> And those server I am working with, they don't have expect package
> installed. :-(
>
> ps. I am not supposed to change the configuration of the servers( includes
> setup openssh keys, or install expect)
Typically you would copy local:~/.ssh/id_dsa.pub (or non dsa
equivalent) into remote:~/.ssh/authorized_keys - since that's only
user level, no need for root access. Its changing the configuration of
the user on the remote machine, but since that user is you, its
usually ok.
You then use -i with scp.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] SCP bash script
2012-05-03 13:20 ` Adam Carter
@ 2012-05-03 15:52 ` LiangYun Gong
0 siblings, 0 replies; 4+ messages in thread
From: LiangYun Gong @ 2012-05-03 15:52 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1223 bytes --]
Right, I am just not sure that's the only way. Since I just want to copy
one file in and one file out on many servers, this solution will double the
work. It's just for servers auditing, you know.
But thanks a lot anyway. Appreciate you help. :-)
On Thu, May 3, 2012 at 9:20 PM, Adam Carter <adamcarter3@gmail.com> wrote:
> On Thu, May 3, 2012 at 9:44 PM, LiangYun Gong <kit393@gmail.com> wrote:
> > Hi guys,
> >
> > I have a problem with scp bash script. I was trying to automate scp
> command
> > to copy files in and out, and I was trying to avoid key in the password
> > myself.
> >
> > So I attempt to use the "here string" feature of bash, it didn't work
> with
> > scp.
> >
> > And those server I am working with, they don't have expect package
> > installed. :-(
> >
> > ps. I am not supposed to change the configuration of the servers(
> includes
> > setup openssh keys, or install expect)
>
> Typically you would copy local:~/.ssh/id_dsa.pub (or non dsa
> equivalent) into remote:~/.ssh/authorized_keys - since that's only
> user level, no need for root access. Its changing the configuration of
> the user on the remote machine, but since that user is you, its
> usually ok.
>
> You then use -i with scp.
>
>
[-- Attachment #2: Type: text/html, Size: 1686 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] SCP bash script
2012-05-03 11:44 [gentoo-user] SCP bash script LiangYun Gong
2012-05-03 13:20 ` Adam Carter
@ 2012-05-04 0:28 ` Joshua Murphy
1 sibling, 0 replies; 4+ messages in thread
From: Joshua Murphy @ 2012-05-04 0:28 UTC (permalink / raw
To: gentoo-user
On Thu, May 3, 2012 at 7:44 AM, LiangYun Gong <kit393@gmail.com> wrote:
> Hi guys,
>
> I have a problem with scp bash script. I was trying to automate scp command
> to copy files in and out, and I was trying to avoid key in the password
> myself.
>
> So I attempt to use the "here string" feature of bash, it didn't work with
> scp.
>
> And those server I am working with, they don't have expect package
> installed. :-(
>
> ps. I am not supposed to change the configuration of the servers( includes
> setup openssh keys, or install expect)
>
> You guys have any idea that can help this case?
>
> Thanks & Regards,
> kit393
Well, expect is generally used client-side and doesn't require a
server-side counterpart, assuming you're pulling files to, or pushing
from, a machine you do have actual control of. SSH keys are the usual
means, since they don't involve writing a password somewhere in plain
text, but lacking those, expect on your own machine would do the
trick.
--
Poison [BLX]
Joshua M. Murphy
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-05-04 0:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-03 11:44 [gentoo-user] SCP bash script LiangYun Gong
2012-05-03 13:20 ` Adam Carter
2012-05-03 15:52 ` LiangYun Gong
2012-05-04 0:28 ` Joshua Murphy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox