The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to upgrade ssh on cpanel server

Discussion in 'General Discussion' started by drew5746, Apr 24, 2009.

  1. drew5746

    drew5746 Registered

    Joined:
    Sep 24, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I tried to upgrade my version of ssh on our cpanel server using the following options ./configure --prefix=/opt --sysconfdir=/etc/ssh in order to match what was already in place and working with cpanel. I finished compiling, installing and restarted sshd through whm. I was able to log in through ssh fine but when i ran ssh -V the old version is still showing up instead of the new on even after restarting sshd. Did I install it in the wrong place? Could someone send me step by step directions to get this upgraded. Thanks in advance!
     
  2. ffeingol

    ffeingol Well-Known Member
    PartnerNOC

    Joined:
    Nov 9, 2001
    Messages:
    215
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    DataCenter Provider
    I'm just wondering why you are manually building SSH and not just using your OS's package manager?
     
  3. Zishan

    Zishan Well-Known Member

    Joined:
    Aug 6, 2005
    Messages:
    104
    Likes Received:
    1
    Trophy Points:
    0
    You added --prefix=/opt that will install the ssh in /opt directory. When you run any command like "ssh", the kernel checks for that binary in the current directory and then the paths mentioned in $PATH environmental variable. I believe that you have not added /opt to $PATH variable. So what you can do is add /opt in $PATH variable but before /usr/bin so that the kernel looks for ssh binary in /opt instead of the default installation.
     
  4. viraj

    viraj Well-Known Member

    Joined:
    Sep 28, 2006
    Messages:
    209
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Hi,

    You can also try using 'Yum' to get the latest version of SSH installed/upgraded.
    Login to SSH as root, backup the existing configuration folder [/etc/ssh/] & execute "yum upgrade openssh*" or "yum install openssh*".
    After the process is complete, make sure to restart the SSH service [service sshd restart]
     
  5. mctDarren

    mctDarren Well-Known Member

    Joined:
    Jan 6, 2004
    Messages:
    664
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    New Jersey
    cPanel Access Level:
    Root Administrator
    Great advice if they are using a RedHat flavor, but they never mentioned their OS. Zishan is right - make sure all files from the old install are gone before installing to a new location.
     
  6. eth00

    eth00 Well-Known Member
    PartnerNOC

    Joined:
    Mar 30, 2003
    Messages:
    723
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    NC
    cPanel Access Level:
    Root Administrator
    I have been using a slightly different configure line over at: http://www.eth0.us/sshd

    If you do follow that just make sure you have upgraded to the latest version of both.
     
Loading...

Share This Page