IBM Cloud Docs
Connecting to a Windows bare metal server

Connecting to a Windows bare metal server

After you create your Windows bare metal server, you can connect to it by using the following steps.

Before you begin

Complete the following prerequisites:

  1. Make sure that you have the private key that is associated with the public SSH key that was used to create the Windows server. If multiple SSH keys were added when the server was created, you must use the first SSH key that was added.

For Windows or VMware images, you must use the RSA SSH key type. The Ed25519 SSH key type can't be used to with Windows or VMware images. For more information, see Getting started with SSH keys.

  1. Make sure that you download, install, and initialize the following CLI plug-ins:

  2. Have Microsoft Remote Desktop client software available.

  3. Make sure that the security group that is associated with the server allows inbound and outbound Remote Desktop Protocol traffic (TCP port 3389).

    For example, to allow all SSH traffic (3389) and ping traffic (ICMP type 8):

    Configuration information for inbound rules
    Protocol Source Type Source Value
    TCP Any <cidr_range> 3389
    UDP Any <cidr_range> 3389
    ICMP Any <cidr_range> Type: 8, Code: Any

    Then, configure outbound rules to allow all TCP traffic:

    Configuration information for outbound rules
    Protocol Destination Type Source Value
    TCP Any <cidr_range> Any port

Connecting to your Windows bare metal server

After you create your Windows server and complete the prerequisites, use the following steps to connect to it.

  1. Query the status of your server by running the following command. SERVER_ID is the ID for the server that you want to connect:

    ibmcloud is bare-metal-server SERVER
    

    When the server shows running, you are ready to retrieve the initialization values to get your password.

  2. Run the following command to initialize your server and obtain your password. Specify your server ID for the SERVER_ID variable and your private key for the KEY or KEY_FILE variable:

    ibmcloud is  bare-metal-server-initialization-values SERVER_ID [--private-key (KEY | @KEY_FILE)]
    

    This command decodes and decrypts your password, which is automatically generated when you create a server by using a Windows image. The password is decoded and decrypted based on the public SSH Key that you used at creating time and the associated private SSH key that you specify in this bare-metal-server-initialization-values command. For more information, see the CLI command reference.

    The following command shows example usage for the bare-metal-server-initialization-values command where 0xx4e27x-33xx-4e7x-a08b-bexx2ac3xx0c is the server ID and ~/.ssh/id_rsa is the location of the user's private key file:

    ibmcloud is bare-metal-server-initialization-values 0xx4e27x-33xx-4e7x-a08b-bexx2ac3xx0c --private-key @~/.ssh/id_rsa
    

    You can also use the API to get the encrypted password, which returns the decoded and decrypted password. For more information, see Retrieve initialization configuration for a bare metal server.

  3. After you obtain your password, you can optionally associate a floating IP address to your Windows server so you can connect to it from an internet location. Run the following command to associate a floating IP address to your server, where NIC_ID is the ID of the target network interface (for example, eth0).

    ibmcloud is floating-ip-reserve <FLOATING_IP_NAME> --nic-id <NIC_ID>
    
  4. You now have a decrypted password and a floating IP address to connect to your Windows server. Use your preferred Remote Desktop client to connect to your server. To connect to your server, provide the floating IP address and the decrypted password. The username is Administrator by default. (If you are connecting from a client that is running the Windows Administrator account, use .\administrator as the user ID to log on to RDP.)

Next steps

After you connect to your server, you can manage your server.