Veritas Access 安装指南
- Veritas Access 简介
- Veritas Access 授权许可
- 系统要求
- 准备安装 Veritas Access
- 在 VMware ESXi 中部署用于安装 Veritas Access 的虚拟机
- 安装和配置群集
- 使用响应文件自动运行 Veritas Access 安装和配置
- 显示和添加群集节点
- 升级 Veritas Access和操作系统
- 使用滚动升级来升级 Veritas Access
- 卸载 Veritas Access
- 附录 A. 安装参考
- 附录 B. 配置安全 Shell 进行通信
- 附录 C. 手动部署 Veritas Access
使用 pwdutil.pl 实用程序设置 ssh 和 rsh 连接
密码实用程序 pwdutil.pl 已捆绑在 7.3 版本中的 /opt/VRTS/repository/ga/images/SSNAS/7.3.0.0/scripts/pwdutil.pl 目录下。用户可以在脚本中运行该实用程序,从而自动设置 ssh 和 rsh 连接。
# ./pwdutil.pl -h Usage: Command syntax with simple format: pwdutil.pl check|configure|unconfigure ssh|rsh <hostname|IP addr> [<user>] [<password>] [<port>] Command syntax with advanced format: pwdutil.pl [--action|-a 'check|configure|unconfigure'] [--type|-t 'ssh|rsh'] [--user|-u '<user>'] [--password|-p '<password>'] [--port|-P '<port>'] [--hostfile|-f '<hostfile>'] [--keyfile|-k '<keyfile>'] [-debug|-d] <host_URI> pwdutil.pl -h | -?
表:pwdutil.pl 实用程序的选项
选项 |
用法 |
---|---|
--action|-a 'check|configure|unconfigure' |
指定操作类型,默认为“check”。 |
--type|-t 'ssh|rsh' |
指定连接类型,默认为“ssh”。 |
--user|-u '<user>' |
指定用户 ID,默认为本地用户 ID。 |
--password|-p '<password>' |
指定用户密码,默认为用户 ID。 |
--port|-P '<port>' |
指定 ssh 连接的端口号,默认为 22。 |
--keyfile|-k '<keyfile>' |
指定私钥文件。 |
--hostfile|-f '<hostfile>' |
指定列出主机的文件。 |
-debug |
打印调试信息。 |
-h|-? |
打印帮助消息。 |
<host_URI> |
可以为下列格式: <主机名> <用户>:<密码>@<主机名> <用户>:<密码>@<主机名>: <端口> |
可以使用 pwdutil.pl 实用程序检查、配置和取消配置 ssh 或 rsh。例如:
检查 ssh 连接是否仅用于一台主机:
pwdutil.pl check ssh hostname
仅为一台主机配置 ssh:
pwdutil.pl configure ssh hostname user password
仅为一台主机取消配置 rsh:
pwdutil.pl unconfigure rsh hostname
为多台具有相同用户 ID 和密码的主机配置 ssh:
pwdutil.pl -a configure -t ssh -u user -p password hostname1 hostname2 hostname3
为多台具有不同用户 ID 和密码的不同主机配置 ssh 或 rsh:
pwdutil.pl -a configure -t ssh user1:password1@hostname1 user2:password2@hostname2
为多台具有一个配置文件的主机检查或配置 ssh 或 rsh:
pwdutil.pl -a configure -t ssh --hostfile /tmp/sshrsh_hostfile
要使主机配置文件保密,可以使用第三方实用程序对主机文件进行密码加密和解密。
例如:
### run openssl to encrypt the host file in base64 format # openssl aes-256-cbc -a -salt -in /hostfile -out /hostfile.enc enter aes-256-cbc encryption password: <password> Verifying - enter aes-256-cbc encryption password: <password> ### remove the original plain text file # rm /hostfile ### run openssl to decrypt the encrypted host file # pwdutil.pl -a configure -t ssh `openssl aes-256-cbc -d -a -in /hostfile.enc` enter aes-256-cbc decryption password: <password>
要使用未位于默认 $
HOME/.ssh
目录下的 ssh 身份验证密钥,可以使用 --keyfile 选项来指定 ssh 密钥。例如:### create a directory to host the key pairs: # mkdir /keystore ### generate private and public key pair under the directory: # ssh-keygen -t rsa -f /keystore/id_rsa ### setup ssh connection with the new generated key pair under the directory: # pwdutil.pl -a configure -t ssh --keyfile /keystore/id_rsa user:password@hostname
可以使用以下命令查看配置文件的内容:
# cat /tmp/sshrsh_hostfile user1:password1@hostname1 user2:password2@hostname2 user3:password3@hostname3 user4:password4@hostname4 # all default: check ssh connection with local user hostname5 The following exit values are returned: 0 Successful completion. 1 Command syntax error. 2 Ssh or rsh binaries do not exist. 3 Ssh or rsh service is down on the remote machine. 4 Ssh or rsh command execution is denied due to password is required. 5 Invalid password is provided. 255 Other unknown error.