Aix升级和安装ssh配置过程
Aix升级和安装ssh配置过程
部门IBM小型机的Aix操作系统需要进行ssh补丁修复,修复其实就是ssh版本你的升级,对升级的过程和中途遇到的问题做了记录如下。
配置前背景
操作系统:
gdboss2/>uname -u //操作系统的Aix5.3
IBM,020693E5P
gdboss2/>uname -a
AIX gdboss1 3 5 00F693E54C00
ssh版本:
gdboss2/>ssh -V
OpenSSH_7.1p1, OpenSSL 1.0.2j 26 Sep 2016
配置步骤
-
登录官网寻找文件
Aix操作系统的相关服务文件需要到IBM的官网去下载,ssh服务也可以在官网找到。ssh的下载地址为 https://www-01.ibm.com/marketing/iwm/iwm/web/pickUrxNew.do?source=aixbp,openssh安装和升级需要两个包,一个是openssh,一个是openssl(负责ssh加密的工具,所有ssh安装是要依赖ssl的)
记得Readme也可以下载下来参考官方提供的相关资料哦。
C:\Documents and Settings\Administrator>ftp 10.16.9.13
Connected to 10.16.9.13.
220 gdboss2 FTP server (Version 4.2 Fri Aug 5 20:09:00 CDT 20
User (10.16.9.13:(none)): root
331 Password required for root.
Password:
230-Last unsuccessful login: Thu Mar 26 08:59:41 BEIST 2020 o
0.16.8.38
230-Last login: Thu Apr 16 21:43:29 BEIST 2020 on /dev/pts/1
230 User root logged in.
ftp>
ftp> cd /tmp
250 CWD command successful.
ftp> bin //ftp上传一定要切换成Bin模式不然解压会报错
200 Type set to I.
ftp> lcd f:/
Local directory now F:\.
ftp> put OpenSSH_8.1.102.2000.tar.Z
200 PORT command successful.
150 Opening data connection for OpenSSH_8.1.102.2000.tar.Z.
226 Transfer complete.
ftp: 11484579 bytes sent in 0.92Seconds 12456.16Kbytes/sec.
ftp> put openssl-1.0.2.2001.tar.Z
200 PORT command successful.
150 Opening data connection for openssl-1.0.2.2001.tar.Z.
226 Transfer complete.
ftp: 34852981 bytes sent in 3.28Seconds 10622.67Kbytes/sec.
5.解压并安装
gdboss2/>cd /tmp
gdboss2/tmp>
gdboss2/tmp>mkdir openssh8.1 //创建ssh安装目录
gdboss2/tmp>mkdir openssl1.0.2 //创建ssl安装目录
gdboss2/tmp>mv OpenSSH_8.1.102.2000.tar.Z openssh8.1 //移动到相关目录
gdboss2/tmp>mv openssl-1.0.2.2001.tar.Z openssl1.0.2 //移动到相关目录
gdboss2/tmp>cd openssl1.0.2 //先解压ssl并安装
gdboss2/tmp/openssl1.0.2>ls -l
total 68080
-rw-r----- 1 root system 34852981 Apr 16 22:52 openssl-1.0.2.2001.tar.Z
gdboss2/tmp/openssl1.0.2>uncompress openssl-1.0.2.2001.tar.Z
gdboss2/tmp/openssl1.0.2>ls -l
total 113072
-rw-r----- 1 root system 57886720 Apr 16 22:52 openssl-1.0.2.2001.tar
gdboss2/tmp/openssl1.0.2>tar -xvf openssl-1.0.2.2001.tar
x openssl-1.0.2.2001
x openssl-1.0.2.2001/openssl.base, 54540288 bytes, 106524 media blocks.
x openssl-1.0.2.2001/openssl.license, 50176 bytes, 98 media blocks.
x openssl-1.0.2.2001/openssl.man.en_US, 3290112 bytes, 6426 media blocks.
gdboss2/tmp/openssl1.0.2>ls -l
total 113064
drwxr-xr-x 2 root system 256 Dec 06 13:10 openssl-1.0.2.2001
-rw-r----- 1 root system 57886720 Apr 16 22:52 openssl-1.0.2.2001.tar
gdboss2/tmp/openssl1.0.2>cd openssl-1.0.2.2001
gdboss2/tmp/openssl1.0.2/openssl-1.0.2.2001>pwd
/tmp/openssl1.0.2/openssl-1.0.2.2001
gdboss2/tmp/openssl1.0.2/openssl-1.0.2.2001>smitty install_latest
Install Software
Type or select a value for the entry field.
Press Enter AFTER making all desired changes.
[Entry Fields]
* INPUT device / directory for software [./] //这里选择当前目录 +
F1=Help F2=Refresh F3=Cancel F4=List
F5=Reset F6=Command F7=Edit F8=Image
F9=Shell F10=Exit Enter=Do
Install Software
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
* INPUT device / directory for software ./
* SOFTWARE to install [_all_latest] +
PREVIEW only? (install operation will NOT occur) no +
COMMIT software updates? yes +
SAVE replaced files? no +
AUTOMATICALLY install requisite software? yes +
EXTEND file systems if space needed? yes +
OVERWRITE same or newer versions? no +
VERIFY install and check file sizes? no +
Include corresponding LANGUAGE filesets? yes +
DETAILED output? no +
Process multiple volumes? yes +
ACCEPT new license agreements? yes +//这里选择接受licens,不然会报错
Preview new LICENSE agreements? no +
ARE YOU SURE? |
| |
| Continuing may delete information you may want |
| to keep. This is your last chance to stop |
| before continuing. |
| Press Enter to continue. |
| Press Cancel to return to the application. //继续点击回车确定
Command: OK stdout: yes stderr: no
Before command completion, additional instructions may appear below.
[TOP]
geninstall -I "a -cgNQqwXY -J" -Z -d ./ -f File 2>&1
File:
I:openssl.base 1.0.2.2001
I:openssl.license 1.0.2.2001
I:openssl.man.en_US 1.0.2.2001
+-----------------------------------------------------------------------------+
Pre-installation Verification...
+-----------------------------------------------------------------------------+
Verifying selections...done //差不多2分钟就安装好了
[MORE...103]
接下来安装ssh
gdboss2/tmp>cd openssh8.1
gdboss2/tmp/openssh8.1>ls -l
total 22432
-rw-r----- 1 root system 11484579 Apr 16 22:52 OpenSSH_8.1.102.2000.tar.Z
gdboss2/tmp/openssh8.1>uncompress OpenSSH_8.1.102.2000.tar.Z
gdboss2/tmp/openssh8.1>ls -l
total 25592
-rw-r----- 1 root system 13096960 Apr 16 22:52 OpenSSH_8.1.102.2000.tar
gdboss2/tmp/openssh8.1>tar -xvf OpenSSH_8.1.102.2000.tar
x OpenSSH_8.1.102.2000
x OpenSSH_8.1.102.2000/openssh.base, 11649024 bytes, 22752 media blocks.
x OpenSSH_8.1.102.2000/openssh.license, 446464 bytes, 872 media blocks.
x OpenSSH_8.1.102.2000/openssh.man.en_US, 196608 bytes, 384 media blocks.
x OpenSSH_8.1.102.2000/openssh.msg.CA_ES, 20480 bytes, 40 media blocks.
x OpenSSH_8.1.102.2000/openssh.msg.CS_CZ, 21504 bytes, 42 media blocks.
x OpenSSH_8.1.102.2000/openssh.msg.DE_DE, 21504 bytes, 42 media blocks.
x OpenSSH_8.1.102.2000/openssh.msg.EN_US, 17408 bytes, 34 media blocks.
x OpenSSH_8.1.102.2000/openssh.msg.ES_ES, 20480 bytes, 40 media blocks.
x OpenSSH_8.1.102.2000/openssh.msg.FR_FR, 21504 bytes, 42 media blocks.
x OpenSSH_8.1.102.2000/openssh.msg.HU_HU, 21504 bytes, 42 media blocks.
x OpenSSH_8.1.102.2000/openssh.msg.IT_IT, 19456 bytes, 38 media blocks.
x OpenSSH_8.1.102.2000/openssh.msg.JA_JP, 24576 bytes, 48 media blocks.
x OpenSSH_8.1.102.2000/openssh.msg.Ja_JP, 26624 bytes, 52 media blocks.
x OpenSSH_8.1.102.2000/openssh.msg.KO_KR, 22528 bytes, 44 media blocks.
x OpenSSH_8.1.102.2000/openssh.msg.PL_PL, 20480 bytes, 40 media blocks.
x OpenSSH_8.1.102.2000/openssh.msg.PT_BR, 19456 bytes, 38 media blocks.
x OpenSSH_8.1.102.2000/openssh.msg.RU_RU, 25600 bytes, 50 media blocks.
x OpenSSH_8.1.102.2000/openssh.msg.SK_SK, 20480 bytes, 40 media blocks.
x OpenSSH_8.1.102.2000/openssh.msg.ZH_CN, 25600 bytes, 50 media blocks.
x OpenSSH_8.1.102.2000/openssh.msg.ZH_TW, 25600 bytes, 50 media blocks.
x OpenSSH_8.1.102.2000/openssh.msg.Zh_CN, 21504 bytes, 42 media blocks.
x OpenSSH_8.1.102.2000/openssh.msg.Zh_TW, 21504 bytes, 42 media blocks.
x OpenSSH_8.1.102.2000/openssh.msg.ca_ES, 20480 bytes, 40 media blocks.
x OpenSSH_8.1.102.2000/openssh.msg.cs_CZ, 27648 bytes, 54 media blocks.
x OpenSSH_8.1.102.2000/openssh.msg.de_DE, 20480 bytes, 40 media blocks.
x OpenSSH_8.1.102.2000/openssh.msg.en_US, 17408 bytes, 34 media blocks.
x OpenSSH_8.1.102.2000/openssh.msg.es_ES, 19456 bytes, 38 media blocks.
x OpenSSH_8.1.102.2000/openssh.msg.fr_FR, 20480 bytes, 40 media blocks.
x OpenSSH_8.1.102.2000/openssh.msg.hu_HU, 20480 bytes, 40 media blocks.
x OpenSSH_8.1.102.2000/openssh.msg.it_IT, 19456 bytes, 38 media blocks.
x OpenSSH_8.1.102.2000/openssh.msg.ja_JP, 26624 bytes, 52 media blocks.
x OpenSSH_8.1.102.2000/openssh.msg.ko_KR, 19456 bytes, 38 media blocks.
x OpenSSH_8.1.102.2000/openssh.msg.pl_PL, 27648 bytes, 54 media blocks.
x OpenSSH_8.1.102.2000/openssh.msg.pt_BR, 19456 bytes, 38 media blocks.
x OpenSSH_8.1.102.2000/openssh.msg.ru_RU, 27648 bytes, 54 media blocks.
x OpenSSH_8.1.102.2000/openssh.msg.sk_SK, 26624 bytes, 52 media blocks.
x OpenSSH_8.1.102.2000/openssh.msg.zh_CN, 21504 bytes, 42 media blocks.
x OpenSSH_8.1.102.2000/openssh.msg.zh_TW, 21504 bytes, 42 media blocks.
gdboss2/tmp/openssh8.1>ls -l
total 25592
drwxr-xr-x 2 root system 4096 Mar 26 15:40 OpenSSH_8.1.102.2000
-rw-r----- 1 root system 13096960 Apr 16 22:52 OpenSSH_8.1.102.2000.tar
gdboss2/tmp/openssh8.1>cd OpenSSH_8.1.102.2000
gdboss2/tmp/openssh8.1/OpenSSH_8.1.102.2000>smitty install_latest //安装ssh
Install Software
Type or select a value for the entry field.
Press Enter AFTER making all desired changes.
[Entry Fields]
* INPUT device / directory for software [./] 这里选择当前目录 +
Install Software
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
* INPUT device / directory for software ./
* SOFTWARE to install [_all_latest] +
PREVIEW only? (install operation will NOT occur) no +
COMMIT software updates? yes +
SAVE replaced files? no +
AUTOMATICALLY install requisite software? yes +
EXTEND file systems if space needed? yes +
OVERWRITE same or newer versions? no +
VERIFY install and check file sizes? no +
Include corresponding LANGUAGE filesets? yes +
DETAILED output? no +
Process multiple volumes? yes +
ACCEPT new license agreements? yes //选择yes接受licens +
Preview new LICENSE agreements? no +
ARE YOU SURE? //点击回车接受继续 |
| |
| Continuing may delete information you may want |
| to keep. This is your last chance to stop |
| before continuing. |
| Press Enter to continue. |
| Press Cancel to return to the application. |
Command: OK stdout: yes stderr: no
Before command completion, additional instructions may appear below.
[TOP]
geninstall -I "a -cgNQqwXY -J" -Z -d ./ -f File 2>&1
File:
I:openssh.base.client 8.1.102.2000
I:openssh.base.server 8.1.102.2000
I:openssh.license 8.1.102.2000
I:openssh.man.en_US 8.1.102.2000
+-----------------------------------------------------------------------------+
Pre-installation Verification...
+-----------------------------------------------------------------------------+ //安装成功
[MORE...205]
安装过的文件集可以通过如下命令查看
gdboss2/>lslpp -l | grep ssh
openssh.base.client 8.1.102.2000 COMMITTED Open Secure Shell Commands
openssh.base.server 8.1.102.2000 COMMITTED Open Secure Shell Server
openssh.license 8.1.102.2000 COMMITTED Open Secure Shell License
openssh.man.en_US 8.1.102.2000 COMMITTED Open Secure Shell
openssh.msg.en_US 8.1.102.2000 COMMITTED Open Secure Shell Messages -
openssh.base.client 8.1.102.2000 COMMITTED Open Secure Shell Commands
openssh.base.server 8.1.102.2000 COMMITTED Open Secure Shell Server
6.重启ssh和检查
默认安装好后系统自动启用ssh服务:
以下命令查看ssh服务:
gdboss2/>lssrc -a | grep ssh //active状态就是成功的
sshd ssh 114694 active
如果是inactive,可通过以下命令启动ssh服务:
gdboss2/>stopsrc -s sshd //停止ssh服务
0513-044 The sshd Subsystem was requested to stop.
gdboss2/>lssrc -a | grep ssh //查看ssh服务状态
sshd ssh inoperative
gdboss2/>startsrc -s sshd //启动ssh服务
0513-059 The sshd Subsystem has been started. Subsystem PID is 114704.
gdboss2/>lssrc -a | grep ssh //查看ssh服务状态
sshd ssh 114704 active
结尾
查看ssh版本为8.1,升级成功
gdboss2/>ssh -V
OpenSSH_8.1p1, OpenSSL 1.0.2t 10 Sep 2019