Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: getting sftp to work with 2 different platforms and keypairs

by atcroft (Abbot)
on Sep 06, 2019 at 22:51 UTC ( #11105757=note: print w/replies, xml ) Need Help??


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.

  • Comment on Re: getting sftp to work with 2 different platforms and keypairs

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11105757]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2020-10-01 15:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (15 votes). Check out past polls.

    Notices?