Openssh upgrade pit encountered

Upgrade Reference article:

https://www.cnblogs.com/nmap/p/10779658.html ( centos7 to upgrade openssh openssh-8.0p1 version )

https://blog.csdn.net/qq_38000902/article/details/80969769 (OpenSSH versions of Linux Centos7 low due to security breaches and OpenSSl OpenSSH upgrade to fix bugs)

https://jingyan.baidu.com/article/08b6a5916ecc5214a9092244.html (OpenSSH most complete CentOS7 upgrade program)

https://openbsd.hk/pub/OpenBSD/OpenSSH/portable/ (SSH download)

https://blog.csdn.net/weixin_34301307/article/details/89692821 (RPM record an offline mode RHEL7, Openssh7.7p1 upgrade)

https://www.cnblogs.com/xun0523/p/9804953.html ( Centos 6.x upgrade openssh version )

Own problems encountered:

1, the lack of gcc

[root@credit_elsearch zlib-1.2.8]# gcc -v
bash: gcc: command not found...
[root@credit_elsearch zlib-1.2.8]# ./configure
Checking for gcc...
Compiler error reporting is too harsh for ./configure (perhaps remove -Werror).
** ./configure aborting.

Installation Reference: https://www.imooc.com/article/17780?block_id=tuijian_wz%20yum%20-y%20install%20gcc%20gcc-c++%20kernel-devel%20//

Download Reference: http://rpmfind.net/linux/rpm2html/search.php?query=ntp

rpm -ivh mpfr-3.1.1-4.el7.x86_64.rpm
rpm -ivh libmpc-1.0.1-3.el7.x86_64.rpm
rpm -ivh kernel-headers-3.10.0-123.el7.x86_64.rpm
rpm -ivh glibc-headers-2.17-55.el7.x86_64.rpm
rpm -ivh glibc-devel-2.17-55.el7.x86_64.rpm
rpm -ivh cpp-4.8.2-16.el7.x86_64.rpm
rpm -ivh gcc-4.8.2-16.el7.x86_64.rpm

2, compiler installation openssl given: POD document had syntax errors at / usr / bin / pod2man line 69. make: *** [install_docs]

Error as follows:

1

2

3

4

5

6

7

cms.pod around line 457: Expected text after =item, not a number

cms.pod around line 461: Expected text after =item, not a number

cms.pod around line 465: Expected text after =item, not a number

cms.pod around line 470: Expected text after =item, not a number

cms.pod around line 474: Expected text after =item, not a number

POD document had syntax errors at /usr/bin/pod2man line 69.

make: *** [install_docs] Error 1

Solution

carried out:

rm -f /usr/bin/pod2man 

Recompile installation.

3, OpenSSH is not installed by default sshd_config file execution

vim /etc/init.d/sshd
in '$ SSHD $ OPTIONS && success || failure' add a line above the line ' the OPTIONS = "- f / etc / SSH / sshd_config" '
save and exit

4, root users can not log in

Solve: vim / etc / ssh / sshd_config

#PermitRootLogin prohibit-password改成PermitRootLogin yes

5, after the upgrade Xshell OpenSSH, SecureCRT and other tools can not connect xftp and can not upload files

Solve: vim / etc / ssh / sshd_config

NO Subsystems of the override default #
#Subsystem SFTP / usr / local / OpenSSH / libexec / SFTP-Server into the following phrase
the Subsystem SFTP Internal-SFTP
. 6, given the PAM

Jul  1 13:11:19 credit_elsearch sshd[6027]: PAM unable to dlopen(/usr/lib64/security/pam_stack.so): /usr/lib64/security/pam_stack.so: cannot open shared object file: No such file or directory
Jul  1 13:11:19 credit_elsearch sshd[6027]: PAM adding faulty module: /usr/lib64/security/pam_stack.so
Jul  1 13:11:19 credit_elsearch sshd[6027]: Failed password for root from 10.23.181.28 port 60094 ssh2
 

After investigation found that ssh will modify /etc/pam.d/sshd rpm upgrade file , as follows:

#%PAM-1.0
auth       required     pam_stack.so service=system-auth
account    required     pam_nologin.so
account    required     pam_stack.so service=system-auth
password   required     pam_stack.so service=system-auth
session    required     pam_stack.so service=system-auth


You can modify as before. Modified file as follows:

 

 

#%PAM-1.0
auth       required     pam_sepermit.so
auth       include      password-auth
account    required     pam_nologin.so
account    include      password-auth
password   include      password-auth
# pam_selinux.so close should be the first session rule
session    required     pam_selinux.so close
session    required     pam_loginuid.so
# pam_selinux.so open should only be followed by sessions to be executed in the user context
session    required     pam_selinux.so open env_params
session    optional     pam_keyinit.so force revoke
session    include      password-auth

7, an error compiled and installed openssl, POD document had syntax errors

man1 Installing / smime.1
  smime.pod around Line 272: After the Expected = text Item, Not A Number
  smime.pod around Line 276: After the Expected = text Item, Not A Number
  smime.pod around Line 280: After the Expected text = Item , Not A Number
  smime.pod around Line 285: After the Expected = text Item, Not A Number
  smime.pod around Line 289: After the Expected = text Item, Not A Number
  the POD syntax errors HAD Document AT / usr / bin / Line 71 is pod2man .
  the make: *** [install_docs] 255 error
  analysis: this is due to incompatible OpenSSL 1.0.1e and perl5.18.
  Solution:
  1. Verify that the installation was compatible perl 5.16, arrange low version of perl 5.16 can solve the problem.
  2, delete pod2man file:
  sudo RM / usr / bin / pod2man

 

Guess you like

Origin blog.csdn.net/weixin_37565541/article/details/93488866