[vox-tech] Using public/private keys was [OT] Pumping a password using Expect

Karsten M. Self kmself at ix.netcom.com
Thu Feb 2 01:49:43 PST 2006


Apologies for the late follow-up.

on Mon, Jan 09, 2006 at 10:11:11AM -0700, timriley (timriley at appahost.com) wrote:
> 
> 
> 
> ---------- Original Message ----------------------------------
> From: "Karsten M. Self" <kmself at ix.netcom.com>
> Reply-To: "lugod's technical discussion forum" <vox-tech at lists.lugod.org>
> Date:  Fri, 6 Jan 2006 12:17:22 -0800
> 
> > What learning curve?
> >
> >   # Test to see if you've got a key, if not, create one.
> >   test -f ~/.ssh/id_dsa.pub || ssh-keygen -t dsa -N "passphrase"
> >
> >   # Copy key to remote host
> >   ssh ~/.ssh/id_dsa.pub user at remotehost 'mkdir .ssh; \
> >       touch .ssh/authorized_keys; chmod 600 .ssh/authorized_keys; \
> >       cat >> .ssh/authorized_keys'
> >
> >   # Test to see if ssh-agent is running, if not, start it.
> >   test [ "$SSH_AGENT_PID"x -ne x ] && ps $SSH_AGENT_PID ||
> >       eval ssh_agent
> >
> >   # enter passphrase
> >   ssh-add  
> >
> >... You've now got the ability to do stuff like:
> >
> >  ssh user at remothost 'command [; command ...]'
> >
> >... without having to enter a passphrase each time.
> 
> Thanks for a bee-line to the solution. However, the following
> errors were generated:
> 
> 1) ssh-keygen: invalid option -- t

What version of ssh-keygen and/or the SSH packages do you have?

I'm using Debian's ssh, which is really OpenSSH v2.

Read your local ssh-keygen manpage and check to see what if any options
it requires to specify keytype.  Usual keytypes are 'dsa' or 'rsa' for
version 2, or 'rsa1' for SSH version 1.


> 2) bash: ssh_agent: command not found

Should be "ssh-agent", not "ssh_agent", my typo.

> 3) ssh-add: Could not open a connection to your authentication agent.

That would be the problem of the above.  Once sorted, should work.


Peace.

-- 
Karsten M. Self <kmself at ix.netcom.com>        http://kmself.home.netcom.com/
 What Part of "Gestalt" don't you understand?
  The revolution will not be televised.
  You can apt-get it from the usual mirrors, however.   http://www.debian.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://ns1.livepenguin.com/pipermail/vox-tech/attachments/20060202/6909cd5c/attachment.pgp


More information about the vox-tech mailing list