Skip to content

Instantly share code, notes, and snippets.

@kugelblitzz
Forked from roommen/OpenSSH Update Script - Amazon Linux 2
Last active March 7, 2023 23:09
Show Gist options
  • Save kugelblitzz/81db8c189611de3f3b19805f5889e168 to your computer and use it in GitHub Desktop.
Save kugelblitzz/81db8c189611de3f3b19805f5889e168 to your computer and use it in GitHub Desktop.
OpenSSH Update Script - Amazon Linux 2
#!/bin/bash
#mkdir /etc/ssh_old
#mv /etc/ssh/* /etc/ssh_old/
sudo yum install gcc -y
sudo yum install openssl-devel -y
sudo yum install zlib-devel -y
sudo yum install mlocate -y
sudo yum install autoconf -y
sudo yum install pam-devel -y
sudo yum install libselinux-devel -y
sudo wget https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.1p1.tar.gz
chmod -R 400 /etc/ssh/
sudo tar zxvf openssh-9.1p1.tar.gz
cd openssh-9.1p1
sudo ./configure --prefix=/usr/local/openssh --sysconfdir=/etc/ssh
sudo make
sudo make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment