aix升級openssh

家有ORACLE老公發表於2022-11-21

原文連線

https://blog.csdn.net/weixin_36065860/article/details/105569751


配置前背景

作業系統:

    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

配置步驟

  1. 登入官網尋找檔案

Aix作業系統的相關服務檔案需要到IBM的官網去下載,ssh服務也可以在官網找到。ssh的下載地址為


4. 上傳軟體至伺服器


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,不然會報錯,Tab鍵切換
  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]      

-----如果上面的有不一致,可以檢視下ssl的版本,是不是已經升級成功,由於自己的多次執行,可能會導致結果不一致。


lslpp -l|grep openss --檢視版本,

 或者

openssl version -a

       
接下來安裝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

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                 +   ---Tab鍵切換
  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


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




來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/69959246/viewspace-2924269/,如需轉載,請註明出處,否則將追究法律責任。

相關文章