Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Another method of passwordless SSH logins' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Another method of passwordless SSH logins
Authored by: Greedo on May 03, '04 01:33:56PM

I don't understand what is trying to be accomplished with this hint.

Do you want to be able to SSH into your Mac or another machine without entering a password? Well, that's what private key authentication is for.

On the machine you are SSHing from (source machine), generate a private key:


ssh-keygen -b 1024 - tsa

If you use the default values for all the promps, you should now have

~/.ssh/id_dsa.pub
and
~/.ssh/id_dsa
files. Copy the contents of the .pub file to your clipboard or somewhere. The contents should be one long line that looks something like:


ssh-dss AAAAB3NzaD1 ... aXdf9L4D== user@machine.local

Connect to the machine you want to ssh to (destination machine) the old way, using your password.

Now, paste the contents of the .pub file from the souce machine to the end of ~/.ssh/authorized_keys file on the destination machine. Make sure it's all one line

That's it. You should now be able to ssh from one machine to the other without entering a password. If you want to ssh to another machine, you don't need to rerun ssh-keygen. Just use the same id_dsa.pub file again.



[ Reply to This | # ]
oops, typos
Authored by: Greedo on May 03, '04 01:35:49PM
That first command should've been

ssh-keygen -b 1024 -t dsa
Run a man ssh-keygen to see more options.

[ Reply to This | # ]
Something's Not Right
Authored by: repetty on May 03, '04 03:28:04PM

Something missing here...

I followed your instructions and now, instead of authenticating with the remote machine, I have to authenticate .ssh/id_dsa

--Richard



[ Reply to This | # ]
Something's Not Right
Authored by: tf23 on May 10, '04 05:40:40AM

Make sure you scp your .pub file over to the other machine. Don't paste it in via a term window.



[ Reply to This | # ]
Re: Something's Not Right
Authored by: Pluto on May 15, '04 11:57:06PM
This maybe a little late , but I had the same problem.... Solved it by changing to a blank passphrase
ssh-keygen -p -t dsa
typed in the old passphase "pluto" hit return for new and reenter. to copy the file over I first mounted the volume with Finder>Go Menu>connect to server>selected "user Name" then in termonal:
 cp   ~/.ssh/id_dsa.pub   /Volumes/pluto/.ssh/authorized_keys
:D

[ Reply to This | # ]
Another method of passwordless SSH logins
Authored by: david-bo on Jun 03, '04 06:54:46PM

Obviously you didn't you even spend 30 seconds to read the description of ssh keychain on the web page. I guess that is your loss

---
http://www.google.com/search?as_q=%22Authored+by%3A+david-bo%22&num=10&hl=en&ie=ISO-8859-1&btnG=



[ Reply to This | # ]