http://qs321.pair.com?node_id=11105757


in reply to getting sftp to work with 2 different platforms and keypairs

To make sure I am understanding correctly, I will try restating your problem:

  1. You have an existing key pair used by your "old linux machine".
  2. You created a key pair using PuTTY and PuTTYGen.
  3. You appended a blank line followed by the public key from PuTTYGen to ~/.ssh/authorized_keys.
  4. Old key works, new key fails.
Sound about right?

My initial troubleshooting of this issue would be along the following lines:

  1. First of all, I do not believe the blank line is the issue. (I tested this on my own system, and it did not seem to affect it.) You can also make the blank line a comment with a leading '#', just to see if that makes a difference. (I doubt it will, however.)
  2. Next, I would verify that the public key you entered into the authorized_keys file is present in its entirety. Assuming you copied the public key from the PuTTYGen interface, make sure that you copied the entire key from the window. (I have seen experienced admins get caught by this.) One way to ensure you all of it is to add a key comment, and verify that it is present in the public key string. (Also not a bad idea, so you can easily identify this key from others.)
  3. I would then verify that the key is a single line entry in the authorized_keys file. (Personally, I would probably move down the file in vi, but whatever way works for you.)

If that did not work, then I would begin looking at (or talking to someone who could look at) the logs on the server, to see if there is anything there that provided the next clue.

As far as the perl script on the Windows machine accessing the server, it is my understanding that can be problematic at best, so I would start by verifying your new key is working in PuTTY before tackling that.

Hope that helps.