IBM Cloud Platform as a Service

 View Only

 How to programmatically identify the default SSH username for various Linux images on IBM Cloud VPC?

Prem Jha's profile image
Prem Jha posted 03/23/26 05:35 AM
I am working on an automation workflow and encountered an issue identifying the correct default SSH username for different Linux flavors on IBM Cloud VPC.
 
While testing a Red Hat image, we found the authorized SSH key was associated with the user vpcuser, but our internal automation logic sometimes assumes root or cloud-user.
 
Is there a specific metadata field in the IBM Cloud VPC API (or via ibmcloud is image) that explicitly defines the default login user for a stock or custom image?
 
Does IBM Cloud provide a definitive list of default users for standard images (e.g., RHEL, Rocky, Ubuntu, CentOS, Debiana)?
 
If the API doesn't emit this information, is there a recommended "best practice" for identifying the correct user without manual trial and error?
 
Any guidance on how to handle this dynamically in code would be greatly appreciated!
ALEJANDRO MORALES GUZMAN's profile image
ALEJANDRO MORALES GUZMAN

Hello ,

You can check this link in the IBM Cloud Doc to check the default user for each Linux flavor: https://cloud.ibm.com/docs/vpc?topic=vpc-vsi_is_connecting_linux#determining-default-user-account

I hope this helps.