FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Red Hat Linux

 
 
LinkBack Thread Tools
 
Old 08-04-2008, 02:51 PM
"Nicholas G. Stamatakos"
 
Default scp in a script with keys and passphrase

Hello--
Looking for help or documentation which will tell me how to use a
passphrase in a script to scp from one computer to another.

I know how to set up the keys and implement a passphrase requirement.
However, I don't know how to put the passphrase properly into a script.

The script is supposed to copy from my account on one computer to
another and be executed in a crontab. However, we are required to use a
passphrase with the keys. I don't see any documentation tell me how to
use incorporate the passphrase in the scp command.

Can anyone on this blog/help discussion list help me with that or point
me in the right direction to some documenation.
Thanks
Nick
--
Nick Stamatakos
US Naval Observatory
3450 Observatory Circle, NW
Washington DC 20392
202 762 1518
stamatakos.nick@usno.navy.mil

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 08-04-2008, 03:08 PM
"Barbeau, Jean-Philippe"
 
Default scp in a script with keys and passphrase

the "expect" package may be what you're looking for. from the rpm description:

---
Expect is a tcl extension for automating interactive applications such
as telnet, ftp, passwd, fsck, rlogin, tip, etc. Expect is also useful
for testing those applications. Expect makes it easy for a script to
control another program and interact with it.

Install the expect package if you want to develop scripts that
interact with interactive applications. You will also need to install
the tcl package.
---

it's available for RHEL 4 & 5.

> -----Message d'origine-----
> De : redhat-list-bounces@redhat.com
> [mailto:redhat-list-bounces@redhat.com] De la part de
> Nicholas G. Stamatakos
> Envoyé : 4 août, 2008 10:51
> À : redhat-list@redhat.com
> Objet : scp in a script with keys and passphrase
>
> Hello--
> Looking for help or documentation which will tell me how to use a
> passphrase in a script to scp from one computer to another.
>
> I know how to set up the keys and implement a passphrase requirement.
> However, I don't know how to put the passphrase properly into
> a script.
>
> The script is supposed to copy from my account on one computer to
> another and be executed in a crontab. However, we are
> required to use a
> passphrase with the keys. I don't see any documentation tell
> me how to
> use incorporate the passphrase in the scp command.
>
> Can anyone on this blog/help discussion list help me with
> that or point
> me in the right direction to some documenation.
> Thanks
> Nick
> --
> Nick Stamatakos
> US Naval Observatory
> 3450 Observatory Circle, NW
> Washington DC 20392
> 202 762 1518
> stamatakos.nick@usno.navy.mil
>
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>


___________________________
Information confidentielle:
Le présent message, ainsi que tout fichier qui y est joint, est envoyé à l'intention exclusive de son ou de ses destinataires; il est de nature confidentielle et peut constituer une information privilégiée. Nous avertissons toute personne autre que le destinataire prévu que tout examen, réacheminement, impression, copie, distribution ou autre utilisation de ce message et de tout fichier qui y est joint est strictement interdit. Si vous n'êtes pas le destinataire prévu, veuillez en aviser immédiatement l'expéditeur par retour de courriel et supprimer ce message et tout document joint de votre système. Merci.

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 08-04-2008, 03:29 PM
Paul Malinowski
 
Default scp in a script with keys and passphrase

Expect can automate task of typing passphrase in a expect script - but ask yourself a question what good is the passphrase if you have to store it in clear text?
*
I know that it may not be the answer for your question, but perhaps you should think of either other way of transfering these files (ftp/rsync/nfs/http) or generating another set of keys without of passphrase?
Kind Regards,*Paul Malinowski

CCNA, CCENT, RHCE



----- Original Message ----
From: "Barbeau, Jean-Philippe" <JP.Barbeau@SAQ.qc.ca>
To: General Red Hat Linux discussion list <redhat-list@redhat.com>
Sent: Monday, 4 August, 2008 4:08:10 PM
Subject: RE: scp in a script with keys and passphrase

the "expect" package may be what you're looking for.* from the rpm description:

---
Expect is a tcl extension for automating interactive applications such
as telnet, ftp, passwd, fsck, rlogin, tip, etc. Expect is also useful
for testing those applications. Expect makes it easy for a script to
control another program and interact with it.

Install the expect package if you want to develop scripts that
interact with interactive applications. You will also need to install
the tcl package.
---

it's available for RHEL 4 & 5.

> -----Message d'origine-----
> De : redhat-list-bounces@redhat.com
> [mailto:redhat-list-bounces@redhat.com] De la part de
> Nicholas G. Stamatakos
> Envoyé : 4 août, 2008 10:51
> À : redhat-list@redhat.com
> Objet : scp in a script with keys and passphrase
>
> Hello--
> Looking for help or documentation which will tell me how to use a
> passphrase in a script to scp from one computer to another.
>
> I know how to set up the keys and implement a passphrase requirement.
> However, I don't know how to put the passphrase properly into
> a script.
>
> The script is supposed to copy from my account on one computer to
> another and be executed in a crontab.* However, we are
> required to use a
> passphrase with the keys.* I don't see any documentation tell
> me how to
> use incorporate the passphrase in the scp command.
>
> Can anyone on this blog/help discussion list help me with
> that or point
> me in the right direction to some documenation.
> Thanks
> Nick
> --
> Nick Stamatakos
> US Naval Observatory
> 3450 Observatory Circle, NW
> Washington DC* 20392
> 202 762 1518
> stamatakos.nick@usno.navy.mil
>
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>


___________________________
Information confidentielle:
Le présent message, ainsi que tout fichier qui y est joint, est envoyé à l'intention exclusive de son ou de ses destinataires; il est de nature confidentielle et peut constituer une information privilégiée. Nous avertissons toute personne autre que le destinataire prévu que tout examen, réacheminement, impression, copie, distribution ou autre utilisation de ce message et de tout fichier qui y* est joint est strictement interdit. Si vous n'êtes pas le destinataire prévu, veuillez en aviser immédiatement l'expéditeur par retour de courriel et* supprimer ce message et tout document joint de votre système. Merci.

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list



__________________________________________________ ________
Not happy with your email address?.
Get the one you really want - millions of new email addresses available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.html
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 08-04-2008, 04:01 PM
Andrew Bacchi
 
Default scp in a script with keys and passphrase

Put your public key in ~/.ssh/authorized_keys on the receiving end.
That way no passwords are needed.


Nicholas G. Stamatakos wrote:

Hello--
Looking for help or documentation which will tell me how to use a
passphrase in a script to scp from one computer to another.

I know how to set up the keys and implement a passphrase requirement.
However, I don't know how to put the passphrase properly into a script.

The script is supposed to copy from my account on one computer to
another and be executed in a crontab. However, we are required to use a
passphrase with the keys. I don't see any documentation tell me how to
use incorporate the passphrase in the scp command.

Can anyone on this blog/help discussion list help me with that or point
me in the right direction to some documenation.
Thanks
Nick


--
veritatas simplex oratio est
-Seneca

Andrew Bacchi
Systems Programmer
Rensselaer Polytechnic Institute
phone: 518.276.6415 fax: 518.276.2809

http://www.rpi.edu/~bacchi/

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 08-04-2008, 04:05 PM
Chaim Rieger
 
Default scp in a script with keys and passphrase

Andrew Bacchi wrote:
Put your public key in ~/.ssh/authorized_keys on the receiving end.
That way no passwords are needed.

that does not apply here

he has a passphrase on his ssh key

need to use expect
however

i would generate a seperate key and use it just for scripts, that way
your co, ncoic, etc.... will all be happy when they see that your ssh
key still has a passphrase.





--
--
Chaim Rieger

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 08-04-2008, 04:40 PM
"Nicholas G. Stamatakos"
 
Default scp in a script with keys and passphrase

Thanks for the help. I took a look at expect and it seems like it might
work for me. I'll try it soon.

Nick
On Mon, 2008-08-04 at 09:05 -0700, Chaim Rieger wrote:
> Andrew Bacchi wrote:
> > Put your public key in ~/.ssh/authorized_keys on the receiving end.
> > That way no passwords are needed.
> that does not apply here
>
> he has a passphrase on his ssh key
>
> need to use expect
> however
>
> i would generate a seperate key and use it just for scripts, that way
> your co, ncoic, etc.... will all be happy when they see that your ssh
> key still has a passphrase.
>
>
>
>
> --
> --
> Chaim Rieger
>
--
Nick Stamatakos
US Naval Observatory
3450 Observatory Circle, NW
Washington DC 20392
202 762 1518
stamatakos.nick@usno.navy.mil

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 

Thread Tools




All times are GMT. The time now is 01:54 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org