1 Answer
- Newest
- Most votes
- Most comments
2
Hello
WinSCP has a great session-logging function. This will give you more detailed information on the "Server refused our key" error. You can enable this in the logging section in WinSCP preferences -> https://winscp.net/eng/docs/ui_pref_logging
Hope this helps you to find the underlying cause of this issue.
answered a year ago
Relevant content
- asked 9 months ago
- asked 2 years ago
- asked 2 years ago
- asked a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 10 months ago
Thank you, this allowe me to fix the issue! The log had the following line in it: "No supported authentication methods available (server sent: publickey,gssapi-keyex,gssapi-with-mic)"
I could research that and the reason for the problem is that newer Amazon Linx version no longer accepts the old key algorithm when using SFTP https://winscp.net/forum/viewtopic.php?t=32146
So, I generated a new key pair using the algorithm ed25519 and then followed these instructions to add the key to the server: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/replacing-key-pair.html
To retrieve the public key for pasting into the .ssh/authorized_keys file on the server, you can use WinSCP too: Edit the session -> Advanced -> SSH -> Authentication. Select the new private key file there and then hit the button "Display Public Key"
Welcome, glad to hear that this worked.