Results 1 to 1 of 1
OK, I've done due diligence and this is annoying the heck out of me.
I'm trying to set up password-less sftp between two servers using RSA/DSA keys generated with custom ...
- 09-20-2008 #1Just Joined!
- Join Date
- Sep 2008
- Posts
- 7
using ssh-keygen's "-f" option
OK, I've done due diligence and this is annoying the heck out of me.
I'm trying to set up password-less sftp between two servers using RSA/DSA keys generated with custom names. When I add the public keys to my remote server's authorized_keys file, I'm always prompted for a password. Yet, here's the thing, if I run the commands again and explicitly specify the default file names with the -f flag, everything works perfectly as expected. Here's an example:
What does not give me password-less sftp:
su - foobar -c "ssh-keygen -t rsa -f ~foobar/.ssh/my_rsa_name -N ''"
su - foobar -c "ssh-keygen -t dsa -f ~foobar/.ssh/my_dsa_name -N ''"
...which creates the expected "my_rsa_name" & "my_rsa_name.pub" pair (same for dsa). When I scp the public key to my remote server and add it to foobar's authorized_keys file, no dice.
What does give me password-less sftp:
su - foobar -c "ssh-keygen -t rsa -f ~foobar/.ssh/id_rsa -N ''"
su - foobar -c "ssh-keygen -t dsa -f ~foobar/.ssh/id_dsa -N ''"
...which creates the expected "id_rsa" & "id_rsa.pub" pair (same for dsa). When I scp the public key to my remote server and add it to foobar's authorized_keys file, I can sftp all day long without a password.
Why do I care? I'm trying to script a process that sits on many servers and part of that process is sending the public keys to one repository server. Instead of having a bunch of "id_rsa.pub" files stepping all over each other, I want to create the keys with unique names so they are easily manageable on the repository server.
Bottom line, the name of the key shouldn't matter as long as the public/private jibe together, right? But, it seems as though the name of the generated keys do matter.
I've got a workaround in place, but it's so sloppy that I should slap it on a bun and serve it with potato chips.
Any suggestions?
Thanks,
Jeff


Reply With Quote