in reply to Re: SSH Help
in thread SSH Help
For those of you yet to experience the pure joy of SSH used properly:
On a unix box: (or Cygwin).
%> ssh-keygen -b 1024 -t RSA <key in a good passphrase twice>
Now let's copy the Public key to the remote machine you want to have access to:
cat .ssh/id_rsa.pub | ssh -l<user> <target_ip> '[ -d .ssh ] || mkdir . +ssh ; chmod 700 .ssh ; cat - >> ~/.ssh/authorized_keys'
Now let's start up ssh-agent. You can either run you WM via ssh-agent: Add the following to your .xinitrc file:
exec /usr/bin/ssh-agent <Window Manager of choice>
or to your .bashrc:
SSHAGENT=$(which ssh-agent) SSHAGENTARGS="-s" if [ -z "$SSH_AUTH_SOCK" -a -x "$SSHAGENT" ]; then eval `$SSHAGENT $SSHAGENTARGS` trap "kill $SSH_AGENT_PID" 0 fi
Hooray... We're all set
Now, run ssh-add to add your private key passphrase to the ssh-agent keyring:%>ssh-add <key in your passphrase>
Now, you can log into the remote machine with wanton abandon.
Repeat as necessary
I hope you'll all forgive the non-perlness of this post but I thought someone, somewhere may just find it usefull.
SM
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: OT - SSH Help
by castaway (Parson) on Oct 29, 2004 at 10:46 UTC | |
by smullis (Pilgrim) on Oct 29, 2004 at 11:02 UTC | |
by archen (Pilgrim) on Oct 29, 2004 at 12:43 UTC |