确保您熟悉如何运行 PuTTY 和 plink 实用程序。
安全 Shell (SSH) 协议指定首次访问新主机服务器会向 SSH 用户发送提问以接受 SSH 服务器公用密钥或用户密码。由于是首次连接到 SSH 服务器,该服务器并未包含在已知主机的 SSH 客户机列表中。因此会有指纹质询,询问您是否负责与该主机连接。 如果输入 y,SSH 客户机将保存主机指纹和 IP 地址。
使用 PuTTY 时,也必须输入 y 以接受该主机指纹。然而,主机指纹和 IP 地址会存储在已登录到 Windows 的用户名的注册表中。
SSH 协议还会指定,接受 SSH 服务器公用密钥后,如果先前接受的 SSH 服务器的指纹更改,将提供另一个提示。在这种情况下,必须确定是否要接受该更改的主机指纹。
对于交互方式,可以使用 PuTTY 可执行文件来打开 SSH 受限 shell 程序。
C:\support utils\putty<username>@svcconsoleip
其中,support utils\putty 是 putty.exe 文件的位置,<username> 是管理 GUI 的 IP 地址,而 <username> 是您要使用的用户名。
IBM_2145:cluster0:superuser>lsuser id name password ssh_key remote usergrp_id usergrp_name 0 superuser yes yes no 0 SecurityAdmin 1 smith no yes no 4 Monitor 2 jones no yes no 2 CopyOperator
可以输入 exit 并按 Enter 键退出交互方式命令。
下面是在交互方式下使用 plink 的主机指纹提示示例:
C:\Program Files\IBM\svcconsole\cimom>plink superuser@9.43.225.208 The server's host key is not cached in the registry. You have no guarantee that the server is the computer you think it is. The server's key fingerprint is: ssh-rsa 1024 e4:c9:51:50:61:63:e9:cd:73:2a:60:6b:f0:be:25:bf If you trust this host, enter "y" to add the key to PuTTY's cache and carry on connecting. If you want to carry on connecting just once, without adding the key to the cache, enter "n". If you do not trust this host, press Return to abandon the connection. Store key in cache? (y/n) y Using user name "superuser". Authenticating with public key "imported-openssh-key" IBM_2145:your_cluster_name:superuser>
对于单行命令方式,可以在一个命令行中输入以下所有内容:
C:\Program Files\IBM\svcconsole\cimom>
plink superuser@9.43.225.208 lsuser
Authenticating with public key "imported-openssh-key"
id name password ssh_key remote usergrp_id usergrp_name
0 superuser yes yes no 0 SecurityAdmin
1 smith no yes no 4 Monitor
2 jones no yes no 2 CopyOperator
下面是在单行命令方式下使用 plink 的主机指纹质询示例:
C:\Program Files\IBM\svcconsole\cimom>
plink superuser@9.43.225.208 lsuser
The server's host key is not cached in the registry. You
have no guarantee that the server is the computer you
think it is.
The server's key fingerprint is:
ssh-rsa 1024 e4:c9:51:50:61:63:e9:cd:73:2a:60:6b:f0:be:25:bf
If you trust this host, enter "y" to add the key to
PuTTY's cache and carry on connecting.
If you want to carry on connecting just once, without
adding the key to the cache, enter "n".
If you do not trust this host, press Return to abandon the
connection.
Store key in cache? (y/n) y
Authenticating with public key "imported-openssh-key"
id name password ssh_key remote usergrp_id usergrp_name
0 superuser yes yes no 0 SecurityAdmin
1 smith no yes no 4 Monitor
2 jones no yes no 2 CopyOperator