Last active
February 7, 2025 04:32
-
-
Save surjikal/aaf0729af90bdc83064b to your computer and use it in GitHub Desktop.
Compile OpenSSH Portable on OSX / MacOS
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
#!/usr/bin/env bash | |
brew install openssl | |
git clone git://anongit.mindrot.org/openssh.git | |
cd openssh | |
# The './configure' script does not exist, so we have to build it | |
autoreconf | |
mkdir dist | |
# Get the dir of the openssl install... | |
BREW_OPENSSL_DIR="$(brew --prefix openssl)" | |
# If you can't get the command above to work... try one of these: | |
# BREW_OPENSSL_DIR=/opt/homebrew/opt/openssl | |
# BREW_OPENSSL_DIR=/usr/local/opt/openssl | |
./configure \ | |
--prefix="$(pwd)/dist" \ | |
LDFLAGS="-L${BREW_OPENSSL_DIR}/lib" \ | |
CPPFLAGS="-I${BREW_OPENSSL_DIR}/include" | |
make |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@oxtoacart cool! Your comment gave me an idea... thank you!
gist updated to get the install location from
brew
, instead of hardcoding the path.