Skip to content

Latest commit

 

History

History
37 lines (31 loc) · 1.61 KB

File metadata and controls

37 lines (31 loc) · 1.61 KB

Accessing a Windows node using SSH

You can access a Windows node by using a secure shell (SSH).

Prerequisites
  • You have installed the Windows Machine Config Operator (WMCO) using Operator Lifecycle Manager (OLM).

  • You have created a Windows compute machine set.

  • You have added the key used in the cloud-private-key secret and the key used when creating the cluster to the ssh-agent. For security reasons, remember to remove the keys from the ssh-agent after use.

  • You have connected to the Windows node using an ssh-bastion pod.

Procedure
  • Access the Windows node by running the following command:

    $ ssh -t -o StrictHostKeyChecking=no -o ProxyCommand='ssh -A -o StrictHostKeyChecking=no \
        -o ServerAliveInterval=30 -W %h:%p core@$(oc get service --all-namespaces -l run=ssh-bastion \
        -o go-template="{{ with (index (index .items 0).status.loadBalancer.ingress 0) }}{{ or .hostname .ip }}{{end}}")' <username>@<windows_node_internal_ip>
    where
  • Specify the cloud provider username, such as Administrator for Amazon Web Services (AWS) or capi for Microsoft Azure.

  • Specify the internal IP address of the node, which can be discovered by running the following command:

    $ oc get nodes <node_name> -o jsonpath={.status.addresses[?\(@.type==\"InternalIP\"\)].address}