Updated OpenSSH Incorrectly
Some of my users were having problems using SFTP and research via Google suggested that removing & reinstalling the openssh server would fix these problems, so I did the following from an SSH terminal session:
This seemed to fix the SFTP problems that were being seen, but now when WHM tries to update my cPanel version, I get these errors and the update dies.
How do I fix this problem? Is the fix as simple as
And then let WHM reinstall the package? Thanks in advance.
yum erase openssh-server
yum install openssh-server
/usr/local/cpanel/scripts/restartsrv_sshd
This seemed to fix the SFTP problems that were being seen, but now when WHM tries to update my cPanel version, I get these errors and the update dies.
[2017-08-03 01:30:26 -0400] Installing : openssh-server-5.3p1-122.el6.x86_64 1/1
[2017-08-03 01:30:26 -0400] E Error unpacking rpm package openssh-server-5.3p1-122.el6.x86_64
[2017-08-03 01:30:26 -0400]
[2017-08-03 01:30:27 -0400]
[2017-08-03 01:30:27 -0400] Verifying : openssh-server-5.3p1-122.el6.x86_64 1/1
[2017-08-03 01:30:27 -0400]
[2017-08-03 01:30:27 -0400] Complete!
[2017-08-03 01:30:27 -0400] E (XID zez2dj) The system failed to execute yum with the arguments "--assumeyes --config /etc/yum.conf install openssh-server" because of an error: The "/usr/bin/yum" command (process 19101) reported error number 1 when it ended. : Error unpacking rpm package openssh-server-5.3p1-122.el6.x86_64
[2017-08-03 01:30:27 -0400] checkyum version 22.3
[2017-08-03 01:30:29 -0400] E Sysup: Needed system RPMs were not installed: openssh-server
[2017-08-03 01:30:29 -0400] ***** FATAL: Cannot proceed. Needed system RPMs were not installed.
How do I fix this problem? Is the fix as simple as
yum erase openssh-server
And then let WHM reinstall the package? Thanks in advance.
-
Hello, It's possible one of the files associated with that RPM is not writable. Could you run the below command and let us know the output? lsattr /usr/sbin/sshd /usr/bin/ssh /usr/bin/scp
Thank you.0 -
Here is the result: # lsattr /usr/sbin/sshd /usr/bin/ssh /usr/bin/scp su---a-------e- /usr/sbin/sshd su--ia-------e- /usr/bin/ssh -------------e- /usr/bin/scp0 -
Hello, Try removing the immutable bit from the /usr/bin/ssh binary to see if that helps. EX: chattr -i /usr/bin/ssh
Thank you.0 -
I did that command: # chattr -i /usr/bin/ssh # lsattr /usr/sbin/sshd /usr/bin/ssh /usr/bin/scp su---a-------e- /usr/sbin/sshd su---a-------e- /usr/bin/ssh -------------e- /usr/bin/scp
I then tried to install the openssh-server via WHM. This is the result:Loaded plugins: fastestmirror Setting up Install Process Loading mirror speeds from cached hostfile * cpanel-addons-production-feed: 72.29.88.74 * base: mirror.nodesdirect.com * extras: mirror.cloud-bricks.net * updates: repo1.ash.innoscale.net Resolving Dependencies --> Running transaction check ---> Package openssh-server.x86_64 0:5.3p1-122.el6 will be installed --> Finished Dependency Resolution Total download size: 329 k Installed size: 702 k Downloading Packages: Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : openssh-server-5.3p1-122.el6.x86_64 1/1 Error unpacking rpm package openssh-server-5.3p1-122.el6.x86_64 Verifying : openssh-server-5.3p1-122.el6.x86_64 1/1 Complete! (XID q3ar7v) The system failed to execute yum with the arguments "--assumeyes --config /etc/yum.conf install openssh-server" because of an error: The "/usr/bin/yum" command (process 5767) reported error number 1 when it ended. : Error unpacking rpm package openssh-server-5.3p1-122.el6.x86_64
Still not working. :(0 -
Hello, Please also remove the "a" attribute: chattr -a /usr/sbin/sshd chattr -a /usr/bin/ssh
Also, are you aware of how those attributes were applied to those files? If not, I recommend consulting with your provider or a system administrator as it's not standard for those attributes to be applied. It indicates a third-party application or a person with root access applied those attributes to prevent the system from changing those binaries. Thank you.0 -
Thanks, that worked. As I said before, I screwed up by trying to fix the problem I was having and updated openssh-server incorrectly. Thanks for your help. 0
Please sign in to leave a comment.
Comments
6 comments