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

Another method of passwordless SSH logins Network
I have read many very complicated hints on how to enable passwordless SSH including this one here on macosxhints.

They are all just unnecessarily complex; here's the easy answer: Download the Gentoo Keychain and follow the instructions (very easy, you just add a line to your login script, .tcshrc or .bashrc etc.). From now on, you just have to enter your SSH key password when the first Terminal opens, and then never again until you restart the computer.

[robg adds: I haven't tested this one. Note that there are some other solutions suggested in the comments to the linked hint, which is actually the third of three in a series (1, 2). When I set my password-free SSH logins up, I used this older hint I wrote up, which is yet another way of doing this...]
    •    
  • Currently 2.50 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (4 votes cast)
 
[20,505 views]  

Another method of passwordless SSH logins | 12 comments | Create New Account
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: etrepum on May 03, '04 10:38:11AM
The easiest way is to download and use SSHKeychain (or something like it).

[ Reply to This | # ]
Another method of passwordless SSH logins
Authored by: atom on May 03, '04 01:27:23PM

i agree. SSHKeychain is great and better than Daniel's keychain. well, it has a gui at least, which is what we OS X users like, right?



[ Reply to This | # ]
Another method of passwordless SSH logins
Authored by: n8gray on May 03, '04 04:28:24PM

I agree. SSHKeychain is nicer than most other solutions because it only asks for your password the first time you actually SSH to another machine, not as soon as it starts up. This means that you don't have to keep entering your password if you aren't using SSH between login/logouts.



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

How well does SSHKeychain work when you ssh to a computer where you are not logged in into the GUI (typically a server) and then wants to ssh to another machine?

I do this all the time for different reasons:

1. I am behind some firewall or so that only allows outgoing ssh from certain nodes in the network
2. I want to keep sessions alive. I have a powerbook which I frequently disconnects, therefore to keep sessions alive I ssh into a something with a more stable connection (i.e. a desktop or server) starts one or more 'screen'-sessions, and within those screen-sessions I connect to other servers. Next time I connect my PB I can connect to the desktop and reattach to my screen-session.

---
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 | # ]
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 | # ]
Another method of passwordless SSH logins
Authored by: mweissen on May 03, '04 03:18:46PM
Fink carries this piece of software.

fink install keychain

[ Reply to This | # ]

Another method of passwordless SSH logins
Authored by: omnivector on May 08, '04 07:04:48PM
i've found ssh keychain works wonderfully, is simple, and graphical.

---
- Tristan

[ Reply to This | # ]