Merge branch 'main' of github.com:Rublon/rublon-ssh-cpp-private
This commit is contained in:
commit
2bf8127af3
4
.gitignore
vendored
4
.gitignore
vendored
@ -72,6 +72,8 @@ CMakeLists.txt.user*
|
||||
*.dll
|
||||
*.exe
|
||||
|
||||
#Vagrant generated files
|
||||
# Vagrant generated files
|
||||
*.vagrant
|
||||
|
||||
# Output files
|
||||
build/
|
||||
|
||||
0
PAM/ssh/CMakeLists.txt
Normal file → Executable file
0
PAM/ssh/CMakeLists.txt
Normal file → Executable file
@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
#include "rapidjson/document.h"
|
||||
#include "rapidjson/pointer.h"
|
||||
#include "rapidjson/writer.h"
|
||||
#include "rublon/utils.hpp"
|
||||
#include <rapidjson/document.h>
|
||||
#include <rapidjson/pointer.h>
|
||||
#include <rapidjson/writer.h>
|
||||
|
||||
#include <cstring>
|
||||
#include <memory_resource>
|
||||
|
||||
51
os/centos/stream9/Vagrantfile
vendored
Normal file → Executable file
51
os/centos/stream9/Vagrantfile
vendored
Normal file → Executable file
@ -1,13 +1,12 @@
|
||||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
|
||||
#Default user
|
||||
#----------------------
|
||||
#login: vagrant
|
||||
#pass: vagrant
|
||||
# Default user
|
||||
# ----------------------
|
||||
# login: vagrant
|
||||
# pass: vagrant
|
||||
Vagrant.configure("2") do |config|
|
||||
|
||||
#Basic configuration
|
||||
# Basic configuration
|
||||
config.vm.provider "virtualbox"
|
||||
config.vm.box = "generic/centos9s"
|
||||
config.ssh.forward_agent = true
|
||||
@ -17,45 +16,39 @@ Vagrant.configure("2") do |config|
|
||||
# your network.
|
||||
config.vm.network "public_network"
|
||||
|
||||
# Share an additional folder to the guest VM. The first argument is
|
||||
# the path on the host to the actual folder. The second argument is
|
||||
# the path on the guest to mount the folder. And the optional third
|
||||
# argument is a set of non-required options.
|
||||
config.vm.synced_folder "../../..", "/home/vagrant/Rublon-Linux"
|
||||
|
||||
config.vm.provider "virtualbox" do |vb|
|
||||
# Display the VirtualBox GUI when booting the machine
|
||||
vb.gui = true
|
||||
vb.gui = true
|
||||
|
||||
# Fix for 'SSH auth method: Private key' stuck
|
||||
vb.customize ["modifyvm", :id, "--cableconnected1", "on"]
|
||||
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
|
||||
yum install -y gcc openssl-devel curl-devel pam-devel rapidjson-devel cmake
|
||||
|
||||
# Building project
|
||||
cd /home/vagrant/Rublon-Linux
|
||||
cmake -B build && cmake --build build
|
||||
sudo cmake --install build
|
||||
|
||||
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
|
||||
|
||||
|
||||
|
||||
62
os/debian/11/Vagrantfile
vendored
Normal file → Executable file
62
os/debian/11/Vagrantfile
vendored
Normal file → Executable file
@ -1,18 +1,12 @@
|
||||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
|
||||
#Default user
|
||||
#----------------------
|
||||
#login: root
|
||||
#pass: vagrant
|
||||
|
||||
#Default files location
|
||||
#----------------------
|
||||
#
|
||||
#/home/vagrant
|
||||
# Default
|
||||
# ----------------------
|
||||
# login: root
|
||||
# pass: vagrant
|
||||
Vagrant.configure("2") do |config|
|
||||
|
||||
#Basic configuration
|
||||
# Basic configuration
|
||||
config.vm.provider "virtualbox"
|
||||
config.vm.box = "debian/bullseye64"
|
||||
config.ssh.forward_agent = true
|
||||
@ -22,41 +16,43 @@ Vagrant.configure("2") do |config|
|
||||
# your network.
|
||||
config.vm.network "public_network"
|
||||
|
||||
# Share an additional folder to the guest VM. The first argument is
|
||||
# the path on the host to the actual folder. The second argument is
|
||||
# the path on the guest to mount the folder. And the optional third
|
||||
# argument is a set of non-required options.
|
||||
config.vm.synced_folder "../../..", "/home/vagrant/Rublon-Linux"
|
||||
|
||||
config.vm.provider "virtualbox" do |vb|
|
||||
# Display the VirtualBox GUI when booting the machine
|
||||
vb.gui = true
|
||||
vb.gui = true
|
||||
|
||||
# Fix for 'SSH auth method: Private key' stuck
|
||||
vb.customize ["modifyvm", :id, "--cableconnected1", "on"]
|
||||
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
|
||||
gcc \
|
||||
build-essential \
|
||||
openssh-server \
|
||||
libcurl4-openssl-dev \
|
||||
libpam0g-dev \
|
||||
libssl-dev \
|
||||
rapidjson-dev \
|
||||
cmake
|
||||
|
||||
# Building project
|
||||
cd /home/vagrant/Rublon-Linux
|
||||
cmake -B build && cmake --build build
|
||||
sudo cmake --install build
|
||||
|
||||
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
|
||||
|
||||
|
||||
55
os/debian/12/Vagrantfile
vendored
Normal file → Executable file
55
os/debian/12/Vagrantfile
vendored
Normal file → Executable file
@ -1,13 +1,12 @@
|
||||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
|
||||
#Default
|
||||
#
|
||||
#login: root
|
||||
#pass: vagrant
|
||||
# Default
|
||||
# ----------------------
|
||||
# login: root
|
||||
# pass: vagrant
|
||||
Vagrant.configure("2") do |config|
|
||||
|
||||
#Basic configuration
|
||||
# Basic configuration
|
||||
config.vm.provider "virtualbox"
|
||||
config.vm.box = "debian/bookworm64"
|
||||
config.ssh.forward_agent = true
|
||||
@ -17,9 +16,18 @@ Vagrant.configure("2") do |config|
|
||||
# your network.
|
||||
config.vm.network "public_network"
|
||||
|
||||
# Share an additional folder to the guest VM. The first argument is
|
||||
# the path on the host to the actual folder. The second argument is
|
||||
# the path on the guest to mount the folder. And the optional third
|
||||
# argument is a set of non-required options.
|
||||
config.vm.synced_folder "../../..", "/home/vagrant/Rublon-Linux"
|
||||
|
||||
config.vm.provider "virtualbox" do |vb|
|
||||
# Display the VirtualBox GUI when booting the machine
|
||||
vb.gui = true
|
||||
vb.gui = true
|
||||
|
||||
# Fix for 'SSH auth method: Private key' stuck
|
||||
vb.customize ["modifyvm", :id, "--cableconnected1", "on"]
|
||||
end
|
||||
|
||||
# Enable provisioning with a shell script. Additional provisioners such as
|
||||
@ -29,29 +37,22 @@ Vagrant.configure("2") do |config|
|
||||
|
||||
DEBIAN_FRONTEND=noniteracactive\
|
||||
apt-get update && apt-get install -y \
|
||||
gcc build-essential openssh-server libcurl4-openssl-dev\
|
||||
libpam0g-dev libssl-dev cmake git
|
||||
gcc \
|
||||
build-essential \
|
||||
openssh-server \
|
||||
libcurl4-openssl-dev \
|
||||
libpam0g-dev \
|
||||
libssl-dev \
|
||||
rapidjson-dev \
|
||||
cmake
|
||||
|
||||
# Building project
|
||||
cd /home/vagrant/Rublon-Linux
|
||||
cmake -B build && cmake --build build
|
||||
sudo cmake --install build
|
||||
|
||||
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
|
||||
|
||||
|
||||
55
os/ubuntu/20.04/Vagrantfile
vendored
Normal file → Executable file
55
os/ubuntu/20.04/Vagrantfile
vendored
Normal file → Executable file
@ -1,13 +1,12 @@
|
||||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
|
||||
#Default user
|
||||
#----------------------
|
||||
#login: vagrant
|
||||
#pass: vagrant
|
||||
# Default user
|
||||
# ----------------------
|
||||
# login: vagrant
|
||||
# pass: vagrant
|
||||
Vagrant.configure("2") do |config|
|
||||
|
||||
#Basic configuration
|
||||
# Basic configuration
|
||||
config.vm.provider "virtualbox"
|
||||
config.vm.box = "ubuntu/focal64"
|
||||
config.ssh.forward_agent = true
|
||||
@ -17,9 +16,18 @@ Vagrant.configure("2") do |config|
|
||||
# your network.
|
||||
config.vm.network "public_network"
|
||||
|
||||
# Share an additional folder to the guest VM. The first argument is
|
||||
# the path on the host to the actual folder. The second argument is
|
||||
# the path on the guest to mount the folder. And the optional third
|
||||
# argument is a set of non-required options.
|
||||
config.vm.synced_folder "../../..", "/home/vagrant/Rublon-Linux"
|
||||
|
||||
config.vm.provider "virtualbox" do |vb|
|
||||
# Display the VirtualBox GUI when booting the machine
|
||||
vb.gui = true
|
||||
vb.gui = true
|
||||
|
||||
# Fix for 'SSH auth method: Private key' stuck
|
||||
vb.customize ["modifyvm", :id, "--cableconnected1", "on"]
|
||||
end
|
||||
|
||||
# Enable provisioning with a shell script. Additional provisioners such as
|
||||
@ -29,29 +37,22 @@ Vagrant.configure("2") do |config|
|
||||
|
||||
DEBIAN_FRONTEND=noniteracactive\
|
||||
apt-get update && apt-get install -y \
|
||||
gcc build-essential openssh-server libcurl4-openssl-dev\
|
||||
libpam0g-dev libssl-dev cmake
|
||||
gcc \
|
||||
build-essential \
|
||||
openssh-server \
|
||||
libcurl4-openssl-dev \
|
||||
libpam0g-dev \
|
||||
libssl-dev \
|
||||
rapidjson-dev \
|
||||
cmake
|
||||
|
||||
# Building project
|
||||
cd /home/vagrant/Rublon-Linux
|
||||
cmake -B build && cmake --build build
|
||||
sudo cmake --install build
|
||||
|
||||
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
|
||||
|
||||
|
||||
57
os/ubuntu/22.04/Vagrantfile
vendored
Normal file → Executable file
57
os/ubuntu/22.04/Vagrantfile
vendored
Normal file → Executable file
@ -1,13 +1,12 @@
|
||||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
|
||||
#Default user
|
||||
#----------------------
|
||||
#login: vagrant
|
||||
#pass: vagrant
|
||||
# Default user
|
||||
# ----------------------
|
||||
# login: vagrant
|
||||
# pass: vagrant
|
||||
Vagrant.configure("2") do |config|
|
||||
|
||||
#Basic configuration
|
||||
# Basic configuration
|
||||
config.vm.provider "virtualbox"
|
||||
config.vm.box = "ubuntu/jammy64"
|
||||
config.ssh.forward_agent = true
|
||||
@ -17,9 +16,18 @@ Vagrant.configure("2") do |config|
|
||||
# your network.
|
||||
config.vm.network "public_network"
|
||||
|
||||
# Share an additional folder to the guest VM. The first argument is
|
||||
# the path on the host to the actual folder. The second argument is
|
||||
# the path on the guest to mount the folder. And the optional third
|
||||
# argument is a set of non-required options.
|
||||
config.vm.synced_folder "../../..", "/home/vagrant/Rublon-Linux"
|
||||
|
||||
config.vm.provider "virtualbox" do |vb|
|
||||
# Display the VirtualBox GUI when booting the machine
|
||||
vb.gui = true
|
||||
vb.gui = true
|
||||
|
||||
# Fix for 'SSH auth method: Private key' stuck
|
||||
vb.customize ["modifyvm", :id, "--cableconnected1", "on"]
|
||||
end
|
||||
|
||||
# Enable provisioning with a shell script. Additional provisioners such as
|
||||
@ -29,34 +37,25 @@ Vagrant.configure("2") do |config|
|
||||
|
||||
DEBIAN_FRONTEND=noniteracactive\
|
||||
apt-get update && apt-get install -y \
|
||||
gcc build-essential openssh-server libcurl4-openssl-dev\
|
||||
libpam0g-dev libssl-dev cmake
|
||||
|
||||
gcc \
|
||||
build-essential \
|
||||
openssh-server \
|
||||
libcurl4-openssl-dev \
|
||||
libpam0g-dev \
|
||||
libssl-dev \
|
||||
rapidjson-dev \
|
||||
cmake
|
||||
|
||||
# Building project
|
||||
cd /home/vagrant/Rublon-Linux
|
||||
cmake -B build && cmake --build build
|
||||
sudo cmake --install build
|
||||
|
||||
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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user