Winscp not able to connect Red Hat Linux (centOS / ec2-user) with private key. Getting following error message.
. No supported authentication methods available (server sent: publickey,gssapi-keyex,gssapi-with-mic)Authentication log (see session log for details): Using username "ec2-user".Server refused our key.Authentication failed.
If you have got a new Linux (RHEL) CentOS Stream 9 machine (operating
system (OS)) and not able to connect to it with your private key from
Winscp or Putty and getting following error message, please follow the
below steps to resolve this issue.
No supported authentication methods available (server sent: publickey,gssapi-keyex,gssapi-with-mic)
Authentication log (see session log for details): Using username "ec2-user".
Server refused our key.
Following Things To Check:
Following Things To Check and Correct:
- Please check whether you are using correct private key or not.
- user name is ec2-user in centOS linux 9 version in AWS. So
please use ec2-user as user id and your private key to connect and
authentication. If you do not have private key and you have only pem
file, please generate private and public key from pem file using
- Please download the latest portable zip version of
Winscp and use it to connect after unziping it. You should be able to
Settings to connect from Winscp zip version
Settings to connect from Putty zip version
- If you are facing issue to connect from Putty, Please
download putty zip version. Generate the private key from pem file
and use this putty and private key to connect to Redhat Linux CentOS
stream 9 .