Create SSH key pair using the algorithm supported/allowed by OpenSSH server you want to connect to.
Convert public key to OpenSSH format.
Transfer converted pubkey to destination server and place it in the appropriate authorized_keys file.
Make sure that access right of the appropriate authorized_keys file (and the whole path to this file) are set in a way that modifications are possible only for root or the user that this key will be used to authenticate as.
Make sure OpenSSH server settings allow pubkey authentication.
Make sure user account you are trying to is not locked and is authorized for remote logins.
Use ssh client to connect to ssh server, making sure that pubkey authentication will be attempted and specifying the the appropriate private key. If you have ssh agent running, make sure that total number of keys to be sent to server before the appropriate one is smaller than the number of authentication retries allowed by server.
If TCP and SSH connection is established but authentication fails, look for OpenSSH server log entries in destination system and try to find the reason there. You may have to increase OpenSSH logging verbosity to get enough info to diagnose the problem. For obvious reasons ssh server simply tells client that authentication attempt failed and does not provide any details, so you have to diagnose problem from the server side.
------------------------------
Lech Szychowski
------------------------------
Original Message:
Sent: Thu May 18, 2023 01:12 PM
From: Manny Rivera
Subject: Creating and using SSH key pai
Hi Lech,
I tried that but it didn't work. I am getting the "Refer refused key" message.
------------------------------
Manny Rivera
------------------------------
Original Message:
Sent: Thu May 18, 2023 04:02 AM
From: Lech Szychowski
Subject: Creating and using SSH key pai
You need to convert SSH public key from putty format to OpenSSH one. AFAIR puttygent has "export key in OpenSSH format" option somewhere in its menus.
------------------------------
Lech Szychowski