sftp batch mode and interactive passwords
robertlaferla at comcast.net
robertlaferla at comcast.net
Wed Feb 21 16:00:16 EST 2007
Thanks. I will try "expect". BTW - I saw that in the man page but I interpreted it as a way to avoid having to type in the password. i.e. it seemed ambiguous to me.
Robert
-------------- Original message ----------------------
From: Dan Ritter <dsr at tao.merseine.nu>
> On Wed, Feb 21, 2007 at 08:47:11PM +0000, robertlaferla at comcast.net wrote:
> > % sftp -b mybatchfile myuser at myhost
> >
> > but instead of prompting me for a password, it gives me a:
> >
> > debug1: Authentications that can continue:
> publickey,password,keyboard-interactive
>
> From the man page:
>
> The final usage format allows for automated sessions using the
> -b option.
> In such cases, it is necessary to configure non-interactive
> authentication to obviate the need to enter a password at
> connection time (see sshd(8) and ssh-keygen(1) for details).
>
> In other word, You Can't Do That, That Way.
>
> Does it have to be SFTP? Can you do SCP instead?
>
> Otherwise, you should use expect to script the whole thing, not
> batch mode.
>
> -dsr-
>
> --
> .. .----. -- .-. . .- -.. .. -. --. -.-- --- ..- .-. -- .- .. .-.. .-.-.-
> .-- .... --- . .-.. ... . .. ... ..--..
> http://tao.merseine.nu/~dsr/eula.html is hereby incorporated by reference.
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the Discuss
mailing list