What is ‘No supported authentication methods available (server sent: public key)’?

unable to ssh_liainfraservices

No supported authentication methods available (server sent: public key)‘ 

One of the biggest concerns for any organization during the cloud migration is the issues that may arise as a cloud migration problem. A proper cloud migration strategy would ensure some reduction of cloud migration risk. 

Unable to ssh to the target VM on Azure after the Azure Migration

The challenge for cloud migration is not only to migrate the server correctly into the target cloud, but it should pass the user acceptance test. 

Cloud migration challenges

One of the challenges a cloud migration team faces during the cloud migration project is getting communication from the customer that the User Acceptance Test (UAT)  was not successful.

Click on to know more on Cloud Migration Challenges.

The UAT may get fail due to the below reasons but not limited to.

  1. The Migration is showing as successful on the dashboard, but unable to  RDP to the target VM.
  2. The Migration is showing as successful, but unable to ssh into the target VM.
  3. Missing files on the target
  4. Unable to load the application
  5. Total available data is lesser than the source volume.
  6. Target VM is conflicting with the production server on the source environment.

CASE STUDY: To demonstrate one of the issues mentioned above, ssh not working for the target VM post-migration.

The customer performed a migration from AWS to Azure and the migration was completed as per the migration tool dashboard.

But the ssh to the target VM was failing with the error No supported authentication methods available (server sent: public key)

To troubleshoot the issue, we had to start from the basics.

Checked the ssh connectivity status for the source production server.

We identified the default port for ssh was changed from 22 to 2222.

The ssh account used was a non-root account.

The migration was happening at the Azure target cloud, which has its own Network Security Group.

Verified the inbound port for the NSG attached to the Network Interface of the Azure target VM.

Enabled the port 2222 for ssh into the NSG, But still, the ssh was failing.

From Azure console used the Azure serial console for the Linux VM.

The serial console of Azure provided us with access to the target VM files.

Navigated to the target VM file system /etc/ssh/sshd_conf

Opened the file using vi editor and found PasswordAuthentication was updated as “no”

So, edited the entry with “yes” and restarted the sshd service.

systemctl restart sshd

Tried to do the ssh and we were able to ssh into the target VM.

Finally, got the confirmation from the customer and passed the UAT(User Acceptance Test)

At Lia infraservices, Our expert team of cloud migration is an expert on migrating the servers into Azure cloud.

0 Comments

Leave A Comment

Your email address will not be published.