Re: BatchMode question

2001-07-19 Thread Greg Wooledge

On Thu, Jul 19, 2001 at 09:42:44AM +0200, Sikora, Grzegorz SD wrote:

> By the way, I have another question. Why when I'm coping files through scp
> the message occurs?
> 
> stty: : Invalid argument

You must have "stty" in one of your shell's login scripts (/etc/profile or
~/.profile or ~/.bash_profile etc.) or startup scripts (~/.bashrc etc.).
You need to shield such commands so that they aren't executed when your
shell is not attached to a tty.

For example, change

stty erase \^h

to something like

if [ -t 0 ]; then
stty erase \^h
fi



Re: BatchMode question

2001-07-19 Thread Xavier

"Sikora, Grzegorz SD" wrote:
> 
> Thank you,
> 
> it works very well.
> By the way, I have another question. Why when I'm coping files through scp
> the message occurs?
> 
> stty: : Invalid argument
> 
> Do you know why?
> 
> Grzegorz Sikora
> 
> Communications Products and Services Department
> Polska Telefonia Cyfrowa Sp. z o.o.
> 
> Specialist
> mob.+48 602 20 6060
> tel. +48 22 413 6060
> email: [EMAIL PROTECTED]
> 
> > -Original Message-
> > From: David Knight French [mailto:[EMAIL PROTECTED]]
> > Sent: 18 lipca 2001 14:16
> > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > Subject: Re: BatchMode question
> >
> >
> > BatchMode is an option that says "Hey, there is no person to
> > answer a password
> > prompt, so quit if one is needed."  This allows batch scripts
> > to continue
> > instead of hanging if something doesn't work and it falls back to
> > PasswordAuthentication.
> >
> > What you need to do is setup public key access with
> > RSAAuthentication.  On the
> > client, generate a public/private key pair with the
> > ssh-keygen program.  Then
> > put the .pub file info into the authorized_keys,
> > authorized_keys2, or file
> > pointed to by the authority file.  Which it goes in depends
> > on the version
> > running on the remote server machine.  If OpenSSH, then
> > something like this:
> >
> > Client:
> >   1) ssh-keygen -t dsa -f ~/.ssh/batch_dsa -N""
> >   2) Copy ~/.ssh/bacth_dsa.pub to server machine
> >
> > Server:
> >   1) append contents of copied file to ~/.ssh/authorized_keys2
> >
> > Now run from client as:
> >
> >   ssh -i ~/.ssh/batch_dsa Remote_CmdLine
> >
> > If either the client or the server or both are ssh.com
> > servers, then this will
> > change slightly,  The keygen options would be different, the
> > location of files
> > may change and the v2 dsa .pub file may need to be converted
> > to the others
> > format.  For the .pub file, the info is the same, but the
> > contents are saved in
> > a different format for v2 between OpenSSH and ssh.com.
> >
> > If either the client or server is an ssh.com server, then
> > repost more about your
> > client and server and I can give more detailed info.
> >
> >   --Dave
> >
> > >From: "Trevor Stuart" <[EMAIL PROTECTED]>
> > >To: <[EMAIL PROTECTED]>
> > >Subject: BatchMode question
> > >Date: Wed, 18 Jul 2001 10:48:09 +0100
> > >MIME-Version: 1.0
> > >Content-Transfer-Encoding: 7bit
> > >X-Priority: 3 (Normal)
> > >X-MSMail-Priority: Normal
> > >X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
> > >Importance: Normal
> > >
> > >I would like to use scp under cron to securely copy a file
> > from one machine
> > >to another.
> > >The SSL_CONFIG files talk about BatchMode yes but I am
> > unable to find out
> > >any more about this
> > >option. How does it get the remote password? Are there any other
> > >configuration requirements?
> > >
> > >Any help anyone can give me will be most appreciated.
> > >
> > >Thanks,
> > >
> > >Trevor Stuart
> > >
> >
> > --
> > David Knight French
> > Black Mountain Computer Consulting
> > Voice: (858)573-2959
> > Email: [EMAIL PROTECTED]
> >

if ou are making scp fro a solaris system you shoud add
the folowing line at your .cshrc to avoid that message:

if ( $?prompt == 0 ) exit   # exit if non-interactive shell

Regards,

Carlos Xavier 
-- 
__
Carlos Roberto Bastos Xavier - SNOC / UNI2
Operations Engineer - Business Security Services
Internet Business Unit
EMBRATEL - Brazil
Tel: +55 21 2519-3060
Fax: +55 21 2519-3055



RE: BatchMode question

2001-07-19 Thread Sikora, Grzegorz SD

Thank you,

it works very well.
By the way, I have another question. Why when I'm coping files through scp
the message occurs?

stty: : Invalid argument

Do you know why? 


Grzegorz Sikora

Communications Products and Services Department
Polska Telefonia Cyfrowa Sp. z o.o.

Specialist
mob.+48 602 20 6060
tel. +48 22 413 6060
email: [EMAIL PROTECTED]



> -Original Message-
> From: David Knight French [mailto:[EMAIL PROTECTED]]
> Sent: 18 lipca 2001 14:16
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: BatchMode question
> 
> 
> BatchMode is an option that says "Hey, there is no person to 
> answer a password 
> prompt, so quit if one is needed."  This allows batch scripts 
> to continue 
> instead of hanging if something doesn't work and it falls back to 
> PasswordAuthentication.
> 
> What you need to do is setup public key access with 
> RSAAuthentication.  On the 
> client, generate a public/private key pair with the 
> ssh-keygen program.  Then 
> put the .pub file info into the authorized_keys, 
> authorized_keys2, or file 
> pointed to by the authority file.  Which it goes in depends 
> on the version 
> running on the remote server machine.  If OpenSSH, then 
> something like this:
> 
> Client:
>   1) ssh-keygen -t dsa -f ~/.ssh/batch_dsa -N""
>   2) Copy ~/.ssh/bacth_dsa.pub to server machine
> 
> Server:
>   1) append contents of copied file to ~/.ssh/authorized_keys2
>   
> Now run from client as:
> 
>   ssh -i ~/.ssh/batch_dsa Remote_CmdLine
> 
> If either the client or the server or both are ssh.com 
> servers, then this will 
> change slightly,  The keygen options would be different, the 
> location of files 
> may change and the v2 dsa .pub file may need to be converted 
> to the others 
> format.  For the .pub file, the info is the same, but the 
> contents are saved in 
> a different format for v2 between OpenSSH and ssh.com.
> 
> If either the client or server is an ssh.com server, then 
> repost more about your 
> client and server and I can give more detailed info.
> 
>   --Dave
> 
> >From: "Trevor Stuart" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Subject: BatchMode question
> >Date: Wed, 18 Jul 2001 10:48:09 +0100
> >MIME-Version: 1.0
> >Content-Transfer-Encoding: 7bit
> >X-Priority: 3 (Normal)
> >X-MSMail-Priority: Normal
> >X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
> >Importance: Normal
> >
> >I would like to use scp under cron to securely copy a file 
> from one machine
> >to another.
> >The SSL_CONFIG files talk about BatchMode yes but I am 
> unable to find out
> >any more about this
> >option. How does it get the remote password? Are there any other
> >configuration requirements?
> >
> >Any help anyone can give me will be most appreciated.
> >
> >Thanks,
> >
> >Trevor Stuart
> >
> 
> --
> David Knight French   
> Black Mountain Computer Consulting
> Voice: (858)573-2959
> Email: [EMAIL PROTECTED]
> 



Re: BatchMode question

2001-07-18 Thread David Knight French

BatchMode is an option that says "Hey, there is no person to answer a password 
prompt, so quit if one is needed."  This allows batch scripts to continue 
instead of hanging if something doesn't work and it falls back to 
PasswordAuthentication.

What you need to do is setup public key access with RSAAuthentication.  On the 
client, generate a public/private key pair with the ssh-keygen program.  Then 
put the .pub file info into the authorized_keys, authorized_keys2, or file 
pointed to by the authority file.  Which it goes in depends on the version 
running on the remote server machine.  If OpenSSH, then something like this:

Client:
1) ssh-keygen -t dsa -f ~/.ssh/batch_dsa -N""
2) Copy ~/.ssh/bacth_dsa.pub to server machine

Server:
1) append contents of copied file to ~/.ssh/authorized_keys2

Now run from client as:

ssh -i ~/.ssh/batch_dsa Remote_CmdLine

If either the client or the server or both are ssh.com servers, then this will 
change slightly,  The keygen options would be different, the location of files 
may change and the v2 dsa .pub file may need to be converted to the others 
format.  For the .pub file, the info is the same, but the contents are saved in 
a different format for v2 between OpenSSH and ssh.com.

If either the client or server is an ssh.com server, then repost more about your 
client and server and I can give more detailed info.

--Dave

>From: "Trevor Stuart" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Subject: BatchMode question
>Date: Wed, 18 Jul 2001 10:48:09 +0100
>MIME-Version: 1.0
>Content-Transfer-Encoding: 7bit
>X-Priority: 3 (Normal)
>X-MSMail-Priority: Normal
>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
>Importance: Normal
>
>I would like to use scp under cron to securely copy a file from one machine
>to another.
>The SSL_CONFIG files talk about BatchMode yes but I am unable to find out
>any more about this
>option. How does it get the remote password? Are there any other
>configuration requirements?
>
>Any help anyone can give me will be most appreciated.
>
>Thanks,
>
>Trevor Stuart
>

--
David Knight French   
Black Mountain Computer Consulting
Voice: (858)573-2959
Email: [EMAIL PROTECTED]