1

I have an SFTP server that runs on Amazon Linux 2 on AWS.

The current SSH version is OpenSSH_7.4p1, is it possible to safely upgrade this to version 7.8. If yes how can I get it done.

Since the SFTP server is already a production environment and has many users and applications connecting to it, I am worried if this upgrade might break anything.

I need to upgrade due to a limitation in the current version.


Update:

I was able to upgrade to the required version. But, my service file seems to not start the sshd service. It instead displays "sshd.service start operation timed out. Terminating." However, the new ssh service starts and works when i manually execute /usr/sbin/sshd in the terminal.

Can some one please help me at this point. Any hints here ?

3
  • General principle: do it in preproduction and once it's validated, do it again in production
    – A.B
    Commented Dec 15, 2020 at 12:05
  • yes. I will be doing it in a clone environment. :)
    – Afnas
    Commented Dec 15, 2020 at 13:48
  • hey, I was able to upgrade to the required version. However, my service file seems to not start the sshd service. It instead displays sshd.service start operation timed out. Terminating. It starts when i manually run /usr/sbin/sshd. Any hints here ?
    – Afnas
    Commented Dec 16, 2020 at 11:26

3 Answers 3

0

If there's an upgrade for CentOS available, you could simply run dnf update - I see no issues with that. Existing SSH sessions will not be terminated.

2
  • I will check if this too. However, mine is Amazon Linux. I had listed out available openssh packages using yum and it showed below available packages 7.4p1-16.amzn2.0.6, 7.4p1-21.amzn2.0.1
    – Afnas
    Commented Dec 15, 2020 at 13:51
  • Your question contained the CentOS tag, so I presumed you were running CentOS. I can't help with Amazon Linux as I've no idea what this distro is and where to get packages for it. Commented Dec 15, 2020 at 14:12
0

This is solved. I followed the below blogs to complete and troubleshoot my openssh upgrade. I was doing it on amazon linux. However, I believe this should work on centos as well.

https://www.tecmint.com/install-openssh-server-from-source-in-linux/

https://blog.jonkimi.com/2020/04/17/Upgrade-openssh-server-on-Ubuntu/

http://blog.chinaunix.net/uid-28813320-id-5786956.html

0

I have upgraded openssh 7.4 to 9.3 on amazon Linux 2 and followed the below steps for the same

  yum groupinstall "Development Tools"
  yum install pam-devel libselinux-devel
  tar zxvf openssh-9.3p1.tar.gz 
  cd openssh-9.3p1/
  ./configure 
  ls -l /usr/local/etc
  ./configure  --with-pam --with-selinux --with-privsep-path=/var/lib/sshd/ --sysconfdir=/etc/ssh
   make
   make install

while running "make install" you will get the below error comment both the line and re-run the "make install"

/etc/ssh/sshd_config line 77: Unsupported option GSSAPIAuthentication
/etc/ssh/sshd_config line 78: Unsupported option GSSAPICleanupCredentials

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .