rsync/ssh passwords

Ed Hill ed at eh3.com
Sun Mar 28 11:56:23 EST 2004


On Sun, 2004-03-28 at 11:34, John Chambers wrote:

> The ssh docs don't seem to mention this at all. Is there any kown way
> to get ssh to play nice and accept a password from a parent process?
> 
> If all else fails, I suppose I can pull out  expect  and  use  it  to
> defeat this misuse of /dev/tty. That is one of the things that expect
> was invented for. But this is sorta like swatting flies with a sledge
> hammer.  It would be nicer if there were some simple, elegant way for
> my scripts to tell rsync "Use this password: ..."
> 
> If nobody knows, I'll just use expect.


Hi John,

With ssh-keygen and ssh-agent, you can create and manage public/private
key pairs for SSH sessions.  The big advantage with this approach is
that, once setup, your scripts won't need passwords and you won't have
to muck around with expect scripts.

See:

  http://www-106.ibm.com/developerworks/library/l-keyc.html
  http://www-106.ibm.com/developerworks/library/l-keyc2/
  http://www-106.ibm.com/developerworks/linux/library/l-keyc3/

for a well written tutorial.

Ed

-- 
Edward H. Hill III, PhD
office:  MIT Dept. of EAPS;  Room 54-1424;  77 Massachusetts Ave.
            Cambridge, MA 02139-4307
email:   eh3 at mit.edu,  ed at eh3.com
URL:     http://web.mit.edu/eh3/
phone:   617-253-0098
fax:     617-253-4464
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.blu.org/pipermail/discuss/attachments/20040328/305e7665/attachment.sig>


More information about the Discuss mailing list