Merge branch 'main' of github.com:Rublon/rublon-ssh-cpp-private

This commit is contained in:
Bartosz Wieczorek 2023-08-22 13:34:57 +02:00
commit cd635de1d7
6 changed files with 313 additions and 0 deletions

3
.gitignore vendored
View File

@ -72,3 +72,6 @@ CMakeLists.txt.user*
*.dll
*.exe
#Vagrant generated files
*.vagrant

63
os/centos/stream9/Vagrantfile vendored Normal file
View File

@ -0,0 +1,63 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
#Default user
#----------------------
#login: vagrant
#pass: vagrant
Vagrant.configure("2") do |config|
#Basic configuration
config.vm.provider "virtualbox"
config.vm.box = "generic/centos9s"
config.ssh.forward_agent = true
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
config.vm.network "public_network"
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
vb.gui = true
end
# Enable provisioning with a shell script. Additional provisioners such as
# Ansible, Chef, Docker, Puppet and Salt are also available. Please see the
# documentation for more information about their specific syntax and use.
config.vm.provision "shell", inline: <<-SHELL
yum update
yum install -y gcc openssl-devel curl-devel pam-devel git cmake
sed -i 's/UsePAM .*/UsePAM yes/' /etc/ssh/sshd_config
sed -i 's/ChallengeResponseAuthentication .*/ChallengeResponseAuthentication yes/' /etc/ssh/sshd_config
mkdir -p ~/.ssh
chmod 700 ~/.ssh
ssh-keyscan -H github.com >> ~/.ssh/known_hosts
git clone git@github.com:Rublon/rublon-ssh-cpp-private.git
cd rublon-ssh-cpp-private/
#Temporary solution due to missing CMakeLists files in .../rapidjson and .../tl
touch PAM/ssh/extern/rapidjson/CMakeLists.txt
#Building project
mkdir build
cd build/
cmake ..
cmake --build .
grep -q -e 'auth required pam_rublon.so' /etc/pam.d/sshd || sed -i '\$aauth required pam_rublon.so' /etc/pam.d/sshd
grep -q -e 'account required pam_rublon.so' /etc/pam.d/sshd || sed -i '\$aaccount required pam_rublon.so' /etc/pam.d/sshd
systemctl restart sshd.service
#service sshd restart - doesnt work
SHELL
end

65
os/debian/11/Vagrantfile vendored Normal file
View File

@ -0,0 +1,65 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
#Default user
#----------------------
#login: root
#pass: vagrant
#Default files location
#----------------------
#
#/home/vagrant
Vagrant.configure("2") do |config|
#Basic configuration
config.vm.provider "virtualbox"
config.vm.box = "debian/bullseye64"
config.ssh.forward_agent = true
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
config.vm.network "public_network"
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
vb.gui = true
end
# Enable provisioning with a shell script. Additional provisioners such as
# Ansible, Chef, Docker, Puppet and Salt are also available. Please see the
# documentation for more information about their specific syntax and use.
config.vm.provision "shell", inline: <<-SHELL
DEBIAN_FRONTEND=noniteracactive\
apt-get update && apt-get install -y \
gcc build-essential openssh-server libcurl4-openssl-dev\
libpam0g-dev libssl-dev cmake git
sed -i 's/UsePAM .*/UsePAM yes/' /etc/ssh/sshd_config
sed -i 's/ChallengeResponseAuthentication .*/ChallengeResponseAuthentication yes/' /etc/ssh/sshd_config
mkdir -p ~/.ssh
chmod 700 ~/.ssh
ssh-keyscan -H github.com >> ~/.ssh/known_hosts
git clone git@github.com:Rublon/rublon-ssh-cpp-private.git
cd rublon-ssh-cpp-private/
#Temporary solution due to missing CMakeLists files in .../rapidjson and .../tl
touch PAM/ssh/extern/rapidjson/CMakeLists.txt
#Building project
mkdir build
cd build/
cmake ..
cmake --build .
grep -q -e 'auth required pam_rublon.so' /etc/pam.d/sshd || sed -i '\$aauth required pam_rublon.so' /etc/pam.d/sshd
grep -q -e 'account required pam_rublon.so' /etc/pam.d/sshd || sed -i '\$aaccount required pam_rublon.so' /etc/pam.d/sshd
service sshd restart
SHELL
end

60
os/debian/12/Vagrantfile vendored Normal file
View File

@ -0,0 +1,60 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
#Default
#
#login: root
#pass: vagrant
Vagrant.configure("2") do |config|
#Basic configuration
config.vm.provider "virtualbox"
config.vm.box = "debian/bookworm64"
config.ssh.forward_agent = true
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
config.vm.network "public_network"
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
vb.gui = true
end
# Enable provisioning with a shell script. Additional provisioners such as
# Ansible, Chef, Docker, Puppet and Salt are also available. Please see the
# documentation for more information about their specific syntax and use.
config.vm.provision "shell", inline: <<-SHELL
DEBIAN_FRONTEND=noniteracactive\
apt-get update && apt-get install -y \
gcc build-essential openssh-server libcurl4-openssl-dev\
libpam0g-dev libssl-dev cmake git
sed -i 's/UsePAM .*/UsePAM yes/' /etc/ssh/sshd_config
sed -i 's/ChallengeResponseAuthentication .*/ChallengeResponseAuthentication yes/' /etc/ssh/sshd_config
mkdir -p ~/.ssh
chmod 700 ~/.ssh
ssh-keyscan -H github.com >> ~/.ssh/known_hosts
git clone git@github.com:Rublon/rublon-ssh-cpp-private.git
cd rublon-ssh-cpp-private/
#Temporary solution due to missing CMakeLists files in .../rapidjson and .../tl
touch PAM/ssh/extern/rapidjson/CMakeLists.txt
#Building project
mkdir build
cd build/
cmake ..
cmake --build .
grep -q -e 'auth required pam_rublon.so' /etc/pam.d/sshd || sed -i '\$aauth required pam_rublon.so' /etc/pam.d/sshd
grep -q -e 'account required pam_rublon.so' /etc/pam.d/sshd || sed -i '\$aaccount required pam_rublon.so' /etc/pam.d/sshd
service sshd restart
SHELL
end

60
os/ubuntu/20.04/Vagrantfile vendored Normal file
View File

@ -0,0 +1,60 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
#Default user
#----------------------
#login: vagrant
#pass: vagrant
Vagrant.configure("2") do |config|
#Basic configuration
config.vm.provider "virtualbox"
config.vm.box = "ubuntu/focal64"
config.ssh.forward_agent = true
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
config.vm.network "public_network"
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
vb.gui = true
end
# Enable provisioning with a shell script. Additional provisioners such as
# Ansible, Chef, Docker, Puppet and Salt are also available. Please see the
# documentation for more information about their specific syntax and use.
config.vm.provision "shell", inline: <<-SHELL
DEBIAN_FRONTEND=noniteracactive\
apt-get update && apt-get install -y \
gcc build-essential openssh-server libcurl4-openssl-dev\
libpam0g-dev libssl-dev cmake
sed -i 's/UsePAM .*/UsePAM yes/' /etc/ssh/sshd_config
sed -i 's/ChallengeResponseAuthentication .*/ChallengeResponseAuthentication yes/' /etc/ssh/sshd_config
mkdir -p ~/.ssh
chmod 700 ~/.ssh
ssh-keyscan -H github.com >> ~/.ssh/known_hosts
git clone git@github.com:Rublon/rublon-ssh-cpp-private.git
cd rublon-ssh-cpp-private/
#Temporary solution due to missing CMakeLists files in .../rapidjson and .../tl
touch PAM/ssh/extern/rapidjson/CMakeLists.txt
#Building project
mkdir build
cd build/
cmake ..
cmake --build .
grep -q -e 'auth required pam_rublon.so' /etc/pam.d/sshd || sed -i '\$aauth required pam_rublon.so' /etc/pam.d/sshd
grep -q -e 'account required pam_rublon.so' /etc/pam.d/sshd || sed -i '\$aaccount required pam_rublon.so' /etc/pam.d/sshd
service sshd restart
SHELL
end

62
os/ubuntu/22.04/Vagrantfile vendored Normal file
View File

@ -0,0 +1,62 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
#Default user
#----------------------
#login: vagrant
#pass: vagrant
Vagrant.configure("2") do |config|
#Basic configuration
config.vm.provider "virtualbox"
config.vm.box = "ubuntu/jammy64"
config.ssh.forward_agent = true
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
config.vm.network "public_network"
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
vb.gui = true
end
# Enable provisioning with a shell script. Additional provisioners such as
# Ansible, Chef, Docker, Puppet and Salt are also available. Please see the
# documentation for more information about their specific syntax and use.
config.vm.provision "shell", inline: <<-SHELL
DEBIAN_FRONTEND=noniteracactive\
apt-get update && apt-get install -y \
gcc build-essential openssh-server libcurl4-openssl-dev\
libpam0g-dev libssl-dev cmake
sed -i 's/UsePAM .*/UsePAM yes/' /etc/ssh/sshd_config
sed -i 's/ChallengeResponseAuthentication .*/ChallengeResponseAuthentication yes/' /etc/ssh/sshd_config
mkdir -p ~/.ssh
chmod 700 ~/.ssh
ssh-keyscan -H github.com >> ~/.ssh/known_hosts
git clone git@github.com:Rublon/rublon-ssh-cpp-private.git
cd rublon-ssh-cpp-private/
#Temporary solution due to missing CMakeLists files in .../rapidjson and .../tl
touch PAM/ssh/extern/rapidjson/CMakeLists.txt
#Building project
mkdir build
cd build/
cmake ..
cmake --build .
grep -q -e 'auth required pam_rublon.so' /etc/pam.d/sshd || sed -i '\$aauth required pam_rublon.so' /etc/pam.d/sshd
grep -q -e 'account required pam_rublon.so' /etc/pam.d/sshd || sed -i '\$aaccount required pam_rublon.so' /etc/pam.d/sshd
service sshd restart
SHELL
end