VMware Cloud Community
orgilplus
Enthusiast
Enthusiast

Converting linux machine error with private key

Hello.

I have to convert "Red Hat Enterprise Linux ES release 4" to vmware, then I got private key using command ssh-keygen -t rsa via putty. Also I convertet to .pem file

Then I tried to convert it with that pem key with vCenter Converter standalone but it gives error with:

Authentication error. Incorrect user name, password, or client private key. This operation also requires that the source machine's SSH daemon configuration allows remote root login.

I am new to linux. Please help me guys

0 Kudos
1 Reply
iisti
Contributor
Contributor

I know this is late for the topic author, but I ran into the same error now and this was one of the first search results from Google, so I hope my answer helps somebody else.

I tried to convert Debian 9 (btw it's not officially supported by the Converter) with VMware vCenter Converter Standalone 6.2.0 build-8466193, but I couldn't get the conversion working with a private key. SSH into via PowerShell or another Debian machine worked fine with the private key and root user

In /var/log/auth.log there were error when trying to connect with the Converter:
Sep 9 15:35:03 ip-172-31-10-204 sshd[9910]: error: Received disconnect from 83.x.y.z port 17023:14: No supported authentication methods available [preauth]
Sep 9 15:35:03 ip-172-31-10-204 sshd[9910]: Disconnected from 83.x.y.z port 17023 [preauth]


Workaround (authentication with password):
# Create backup of the machine.
# Limit access into the SSH port via firewall if possible. This enhances security if the source machine is in public network. root user account is usually constantly bombarded with authentication attempts.
# The next steps are configured in the shell, steps should work in both RHEL, Debian, and other Linux servers.
# Set secure password for root user
sudo passwd root
# Allow password authentication in SSH daemon configuration (you can use some other text editor also than VIM).
sudo vim /etc/ssh/sshd_config
  # Set line: PasswordAuthentication yes
  # Set line: PermitRootLogin yes
# Test the configuration
sudo sshd -t
# Restart sshd
sudo sys
temclt restart sshd
# Test that SSH work via PowerShell, Putty, or Linux shell.
# Start conversion.
# After conversion undo the sshd_config changes.

0 Kudos