HPUX SSH最新的安装软件有三个版本,对应不同版本的操作系统:
T1471AA_A.05.50.013_HP-UX_B.11.11_32_64.depot
T1471AA_A.05.50.014_HP-UX_B.11.23_IA_PA.depot
SecureShell_A.05.50.015_HP-UX_B.11.31_IA_PA.depot
这个SSH对应OpenSSH 5.5p1
HPUX 11i v1 安装这个版本的SSH前,需要先打几个补丁:
libc Patch: PHCO_2774
PAM Patch: PHCO_3315
pthreads Patch: PHCO_26466
查询当前ssh版本
#swlist | grep T1471AA
T1471AA A.04.50.021 HP-UX Secure Shell
安装
可以直接安装HPUX Secure Shell A.05.50,不需要删除之前的老版本,步骤:
$su -
检查下安装文件
#swlist -ds /T1471AA_A.05.50.014_HP-UX_B.11.23_IA_PA.depot
# Initializing...
# Contacting target "hostname"...
#
# Target: hostname:/T1471AA_A.05.50.014_HP-UX_B.11.23_IA_PA.depot
#
#
# Bundle(s):
#
T1471AA A.05.50.014 HP-UX Secure Shell
安装
#swinstall -s /T1471AA_A.05.50.014_HP-UX_B.11.23_IA_PA.depot
选中T1471AA,在Action里选择install
swinstall把SSH安装在/opt/ssh目录下,安装会持续1-2分钟
执行以下命令检查HP-UX Secure Shell是否安装成功
# swlist | grep T1471AA
T1471AA A.05.50.014 HP-UX Secure Shell
说明安装成功。
sshd进程将在安装完后自动启动,执行以下命令检查sshd进程是否启动
# ps -ef | grep sshd
root 18783 1 0 16:52:27 ? 0:00 /opt/ssh/sbin/sshd
root 24544 21012 0 16:55:55 pts/4 0:00 grep sshd
说明进程正在运行。
利用命令:ssh-keygen生成key全部选择默认的就可以 , 生成的private key和public Key会保存在 ~/.ssh目录下。
# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): Created directory '/root/.ssh'.
Enter passphrase (empty for no passphrase): 为了后面的访问方便, passphrase一行密码一般设置为空.
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:***************************************************
禁用telnet登录
#vi /etc/services将其中的
telnet 23/tcp # Virtual Terminal Protocol注释掉,并且
#vi /etc/inetd.conf将其中的
#telnet stream tcp nowait root /usr/lbin/telnetd telnetd注释掉,
重新启动inetd服务,telnet就不能用了
#/sbin/init.d/inetd stop
#/sbin/init.d/inetd start
其它情况:
安装结束后,出了点叉子,使用人员反映CC编译出错。
#ls -la /usr/bin/cc
lrwxr-xr-x 1 root sys 16 Jul 20 16:36:38 /bin/cc -> /usr/ccs/bin/cc
#ls -la /bin/cc
lrwxr-xr-x 1 root sys 16 Jul 20 16:36:38 /bin/cc -> /usr/ccs/bin/cc
检查安装日志文件
#more /var/adm/sw/swagent.log
。。。
WARNING: The following wrong core symbolic links have been changed to
transition links:
wrong symbolic link: /bin/cc -> /opt/aCC/bin/aCC
new transition link: /bin/cc -> /usr/ccs/bin/cc
。。。
晕死,安装程序居然修改了CC的连接,恢复后就正常了。
#ls -la cc
lrwxr-xr-x 1 root sys 16 Jul 21 11:08 cc -> /opt/aCC/bin/aCC
#ls -la /bin/cc
lrwxr-xr-x 1 root sys 16 Jul 21 11:08 /bin/cc -> /opt/aCC/bin/aCC
转载http://whbill.blog.51cto.com/3280780/665215