免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1903 | 回复: 0
打印 上一主题 下一主题

[BE/BESR] Configuring SSH or RSH before installing VeritasSF [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-12-06 02:23 |只看该作者 |倒序浏览
Configuring SSH or RSH before installing SF
                                                       Author: Rover Yao
                                                       Time: 2008-12-05
OS: Solaris 10 x86
Servers: SF01
         SF02
1. Log in as root on SF01 from which you want to install the
Veritas product
2. To generate a DSA key pair on SF01, type the following:
# ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (//.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
3. Make the /.ssh directory is on SF01,If that directory is missing,Create it on SF01 and set the write pemission to root only.
# mkdir /.ssh
# chmod go-w /
# chmod 700 /.ssh
# chmod go-rwx /.ssh
4. Make sure the secure file transfer program SFTP is enabled on SF01.To enable the SFTP,the /etc/ssh/sshd_config must contain the following two lines:
PermitRootLogin yes
Subsystem  sftp  /usr/lib/ssh/sftp-server
5. If the two lines is not there,Add them and restart SSH.To restart SSH,type the following command on SF01.
# svcadm ssh restart
6. To copy the public DSA key, /.ssh/id_dsa.pub to each target system,
type the following commands:
# sftp SF02
Connecting to SF02...
The authenticity of host 'sf02 (192.168.0.20)' can't be established.
RSA key fingerprint is 49:09:46:22:fd:8a:c2:53:f8:16:d6:87:fd:30:a3:65.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'sf02,192.168.0.20' (RSA) to the list of known hosts.Password:     //Enter root password
sftp> put /.ssh/id_dsa.pub
Uploading /.ssh/id_dsa.pub to /id_dsa.pub
sftp> quit
7. To begin the ssh session on SF02,type the following command:
# ssh SF02
password:    //Enter root password
8. After logging in, enter the following command to append the authorization
key to the id_dsa.pub file:
# cat /id_dsa.pub >> /.ssh/authorized_keys

9. To rm /id_dsa.pub public key file after it is copied to SF02 and added to the authorized keys file,Type the following command:
# rm /id_dsa.pub
10. To log out the ssh session,type the following commmad:
# exit
11. When installing from SF01 that is also an installation target, add
the local system id_dsa.pub key to the local /.ssh/authorized_key
file. The installation can fail if the installation source system is not
authenticated.
12. Run the following commands on the source installation system. These
commands bring the private key into the shell environment and makes the
key globally available for the user root:
# exec /usr/bin/ssh-agent $SHELL
# ssh-add
13. To verify that you can connect SF02,type the following command:
# ssh -l root SF02 uname -a
# ssh -l root SF02 uname -a
SunOS SF02 5.10 Generic_137138-09 i86pc i386 i86pc
The commands should execute on the remote system without the system
requesting a passphrase or password.

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/31774/showart_1682036.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP