Last active
April 14, 2023 06:20
-
-
Save rikka0w0/2314802674ab4cf13924025d7202f001 to your computer and use it in GitHub Desktop.
Compile OpenSSH on Linux
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 | |
mv /etc/ssh/sshd_config /etc/ssh/sshd_config.bak | |
apt install build-essential zlib1g-dev libssl-dev libpam0g-dev libselinux1-dev | |
wget -c http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-8.0p1.tar.gz | |
tar -xzf openssh-8.0p1.tar.gz | |
rm openssh-8.0p1.tar.gz | |
cd openssh-8.0p1 | |
./configure --with-md5-passwords --with-pam --with-selinux --with-privsep-path=/var/run/sshd/ --sysconfdir=/etc/ssh | |
make -j2 | |
make install | |
#/usr/local/sbin/sshd -p 25565 | |
#edit /lib/systemd/system/ssh.service | |
#/usr/sbin -> /usr/local/sbin | |
systemctl daemon-reload | |
systemctl restart ssh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment