On Tue, Jul 15, 2003 at 09:51:12AM -0400, Daniel Monjar wrote: > I have a several systems I routinely move files and ssh 'login' between. I > know that by taking my public key and placing it somewhere on the target > system, like in known hosts or some other file, I can do all of this > without having to enter my password. I know this because I did it once a > couple of years ago... but age has taken its toll and I can't get the > incantation quite right. > > so, the question is: > > Assume I have system 1 and 2, what do I put where to be able to scp from 1 > to 2 without having to type in my password?
On the source (1) system, you run "ssh-keygen". I typically use "ssh-keygen -d" to generate a DSA key pair. You will be asked for a passphrase which you'll want to leave blank if you want passwordless logins/copies. This will generate two files in .ssh called "id_dsa" and "id_dsa.pub". You will take the contents of the .pub file and put them on system 2 in the .ssh/authorized_keys file. If this file already exists, then you can append your id_dsa.pub file to the end. Typically i'll do the keygen, then scp my pub file to host 2. Then i'll run "cat id_dsa.pub >> .ssh/authorized_keys" this will append the file to the end. You can troubleshoot this process pretty well with "ssh -v" to see why it might not be using your key. For example, sometimes distro's are setup to use .ssh for ssh1 and .ssh2 for ssh2, but they seem to have moved away from this. -David -- TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug TriLUG Organizational FAQ : http://trilug.org/faq/ TriLUG Member Services FAQ : http://members.trilug.org/services_faq/ TriLUG PGP Keyring : http://trilug.org/~chrish/trilug.asc
