Setting up WebSphere Automation for SSH to Windows servers

To apply security fixes or to collect the heap dump information from managed servers, both WebSphere Automation and the servers must be properly configured to communicate by using SSH. Configure WebSphere Automation to use SSH with your Windows servers.

Before you begin

Make sure that servers to be managed meet the prerequisites in Managed server requirements.

About this task

WebSphere Automation must be configured with the SSH key, user, and other necessary connection parameters to access the WebSphere Application Server or WebSphere Application Server Liberty servers remotely. Setting up WebSphere Application Server to access Windows servers by using SSH is similar to Setting up WebSphere Application Server for SSH to Linux and Unix servers.

Procedure

  1. Create the wsa-ansible-win secret in the WebSphere Automation namespace with your SSH connection parameters:
    oc create secret generic wsa-ansible-win \
       --from-literal=ansible_user=<ssh_username> \
       --from-literal=ansible_port=<ssh_port> \
       --from-file=ssh_private_key_file=<ssh_private_key_file> \
       --from-literal=ssh_private_key_password=<ssh_private_key_passphrase> \
       --from-literal=ansible_shell_type=<shell> \
       --from-literal=ansible_python_interpreter=<path_to_python>

    Refer to the following example.

    oc create secret generic wsa-ansible-win \
       --from-literal=ansible_user=wsadmin \
       --from-literal=ansible_port=22 \
       --from-file=ssh_private_key_file=/home/admin/.ssh/wsa \
       --from-literal=ssh_private_key_password=changeme \
       --from-literal=ansible_shell_type=powershell \
       --from-literal=ansible_python_interpreter='C:\Program Files\Python39\python'

    If your SSH private key is not encrypted, the ssh_private_key_password parameter is not needed. Other connection parameters can also be passed in the same way. The ansible_shell_type parameter reflects the DefaultShell setting that is configured on the Windows server. If the DefaultShell is set to PowerShell, set the value to powershell; otherwise, set it to cmd. Other connection parameters can also be configured in the same way. See the Ansible documentation External link icon for full parameters list.

    If the Python executable on the target machine is not in the system path, or is not named python or python3, the ansible_python_interpreter parameter must added during the secret creation.

  2. Set up a list of known Windows hosts by using step 2 in Setting up WebSphere Application Server for SSH to Linux and Unix servers.