Last active
November 7, 2024 09:28
-
-
Save roommen/18cd78d07b0fbc962de4e79c1d468f92 to your computer and use it in GitHub Desktop.
OpenSSH Update Script - Amazon Linux 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
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 | |
wget https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.1p1.tar.gz | |
tar zxvf openssh-9.1p1.tar.gz | |
cd openssh-9.1p1 && ./configure && make && sudo make install |
smh this broke my clones
sed -i '129a\#include <systemd/sd-daemon.h>' sshd.c sed -i '2095a\ /* Signal systemd that we are ready to accept connections */' sshd.c sed -i '2096a\ sd_notify (0, "READY=1");' sshd.c
Hi everyone, I also updated OpenSSH on EC2 this week. After performing the above steps,
systemctl restart sshd executes successfully but the client cannot connect via ssh.
I think there may be some problem with the original ec2 sshkey after the update?
Has anyone else encountered a similar situation and fixed it?
Hope to get the answer... QQ
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am use centOS 7.6, it should like this