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

timriley timriley at appahost.com
Mon Jan 9 09:11:11 PST 2006




---------- 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
2) bash: ssh_agent: command not found
3) ssh-add: Could not open a connection to your authentication agent.

The learning begins... ;-)
 


More information about the vox-tech mailing list