LinuxUNIX 伺服器上設定 SSH

若要套用安全修正程式或從受管理伺服器收集資料堆傾出資訊,必須適當地配置 WebSphere Automation 及伺服器,以使用 SSH 進行通訊。 配置 Linux®UNIX 伺服器以使用 SSH。

開始之前

要由 WebSphere Automation 管理的每一部伺服器都必須安裝並執行 SSH 伺服器。 WebSphere Automation 使用指定的使用者帳戶透過 SSH 進行連接。 使用者帳戶必須有權執行 wsadmin Script (適用於 WebSphere Application Server) 或 server Script (適用於 WebSphere Application Server Liberty) ,以及存取 WebSphere Application ServerWebSphere Application Server Liberty所產生的資料堆傾出檔。

請確定要管理的伺服器符合 受管理伺服器需求中的必要條件。

關於此作業

使用這些步驟可產生新的 SSH 金鑰,並將它傳送至要管理的每一部 LinuxUNIX 伺服器。 如果您具有想要使用的現有 SSH 金鑰,請跳過此步驟並繼續 設定 WebSphere Automation for SSH 至 Linux 或 UNIX 伺服器

如果您要產生 SSH 金鑰以在啟用 FIPS 的環境中使用,則 SSH 金鑰必須與 FIPS 相容。 如需相關資訊,請參閱 在啟用 FIPS 的環境中,修正程式安裝或記憶體洩漏調查不會進行

程序

  1. 使用 ssh-keygen 指令為 WebSphere Automation 產生新的 SSH 金鑰。
    $ ssh-keygen -f ~/.ssh/wsa
    Generating public/private rsa key pair.
    Enter passphrase (empty for no passphrase): changeme
    Enter same passphrase again: changeme
    Your identification has been saved in /home/admin/.ssh/wsa.
    Your public key has been saved in /home/admin/.ssh/wsa.pub.
    The key fingerprint is:
    SHA256:umZ0BUX89VEi377Gc1J5t5cqfrMldDUqIn4M+1eWeRc admin@admin
    The key's randomart image is:
    +---[RSA 3072]----+
    |         +o . . o|
    |        . .  o.+ |
    |         . . ..o+|
    |          . . .E=|
    |       oSo . ooo*|
    |      o.* . o=ooB|
    |     ..+ o  o.oO+|
    |      o.o  o o=.+|
    |     o.  .o.ooo  |
    +----[SHA256]-----+
  2. 使用 ssh-copy-id 指令將公開金鑰複製到每一部伺服器。
    $ ssh-copy-id -i ~/.ssh/wsa wsadmin@myvm
    /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/admin/.ssh/wsa.pub"
    /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
    /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
    Number of key(s) added: 1
  3. 驗證您可以使用 SSH 來與該伺服器進行通訊。
    $ ssh -i ~/.ssh/wsa wsadmin@myvm

下一步

WebSphere Automation 配置 SSH 金鑰、使用者及其他必要的連線參數,才能從遠端存取 LinuxUNIX 伺服器。 繼續 設定 WebSphere Automation for SSH 至 Linux 或 UNIX 伺服器