Client configuration command
This commit is contained in:
parent
7128f45540
commit
e15f27b722
2
Makefile
2
Makefile
|
@ -17,10 +17,12 @@ install:
|
|||
install -m 644 man/${APP}.1.gz ${DESTDIR}${PREFIX}/share/man/man1
|
||||
install -m 644 man/${APP}-prep.1.gz ${DESTDIR}${PREFIX}/share/man/man1
|
||||
install -m 644 man/${APP}-tordongle.1.gz ${DESTDIR}${PREFIX}/share/man/man1
|
||||
install -m 644 man/${APP}-client.1.gz ${DESTDIR}${PREFIX}/share/man/man1
|
||||
uninstall:
|
||||
rm -f ${PREFIX}/share/man/man1/${APP}.1.gz
|
||||
rm -f ${PREFIX}/share/man/man1/${APP}-prep.1.gz
|
||||
rm -f ${PREFIX}/share/man/man1/${APP}-tordongle.1.gz
|
||||
rm -f ${PREFIX}/share/man/man1/${APP}-client.1.gz
|
||||
rm -rf ${PREFIX}/share/${APP}
|
||||
rm -f ${PREFIX}/bin/${APP}
|
||||
rm -f ${PREFIX}/bin/${APP}-prep
|
||||
|
|
|
@ -11,6 +11,7 @@ sed -i 's/VERSION='${PREV_VERSION}'/VERSION='${VERSION}'/g' Makefile
|
|||
sed -i 's/VERSION="'${PREV_VERSION}'"/VERSION="'${VERSION}'"/g' src/freedombone
|
||||
sed -i 's/VERSION="'${PREV_VERSION}'"/VERSION="'${VERSION}'"/g' src/freedombone-prep
|
||||
sed -i 's/VERSION="'${PREV_VERSION}'"/VERSION="'${VERSION}'"/g' src/freedombone-tordongle
|
||||
sed -i 's/VERSION="'${PREV_VERSION}'"/VERSION="'${VERSION}'"/g' src/freedombone-client
|
||||
|
||||
# change the parent directory name to debian format
|
||||
mv ../${APP} ../${DIR}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
man/freedombone.1.gz
|
||||
man/freedombone-prep.1.gz
|
||||
man/freedombone-tordongle.1.gz
|
||||
man/freedombone-client.1.gz
|
||||
|
|
Binary file not shown.
|
@ -4260,10 +4260,6 @@ function configure_ssh {
|
|||
# see https://stribika.github.io/2015/01/04/secure-secure-shell.html
|
||||
function ssh_remove_small_moduli {
|
||||
awk '$5 > 2000' /etc/ssh/moduli > ~/moduli
|
||||
if [[ $((wc -l ~/moduli | awk -F ' ' '{print $1}')) < 150 ]]; then
|
||||
echo 'Not enough moduli > 2000'
|
||||
exit 57824
|
||||
fi
|
||||
mv ~/moduli /etc/ssh/moduli
|
||||
}
|
||||
|
||||
|
@ -4271,24 +4267,32 @@ function configure_ssh_client {
|
|||
if grep -Fxq "configure_ssh_client" $COMPLETION_FILE; then
|
||||
return
|
||||
fi
|
||||
#sed 's/# PasswordAuthentication.*/ PasswordAuthentication no/g' /etc/ssh/ssh_config
|
||||
#sed 's/# ChallengeResponseAuthentication.*/ ChallengeResponseAuthentication no/g' /etc/ssh/ssh_config
|
||||
sed "s/# HostKeyAlgorithms.*/ HostKeyAlgorithms $SSH_HOST_KEY_ALGORITHMS/g" /etc/ssh/ssh_config
|
||||
sed "s/# Ciphers.*/ Ciphers $SSH_CIPHERS/g" /etc/ssh/ssh_config
|
||||
sed "s/# MACs.*/ MACs $SSH_MACS/g" /etc/ssh/ssh_config
|
||||
#sed -i 's/# PasswordAuthentication.*/ PasswordAuthentication no/g' /etc/ssh/ssh_config
|
||||
#sed -i 's/# ChallengeResponseAuthentication.*/ ChallengeResponseAuthentication no/g' /etc/ssh/ssh_config
|
||||
sed -i "s/# HostKeyAlgorithms.*/ HostKeyAlgorithms $SSH_HOST_KEY_ALGORITHMS/g" /etc/ssh/ssh_config
|
||||
sed -i "s/# Ciphers.*/ Ciphers $SSH_CIPHERS/g" /etc/ssh/ssh_config
|
||||
sed -i "s/# MACs.*/ MACs $SSH_MACS/g" /etc/ssh/ssh_config
|
||||
if ! grep -q "HostKeyAlgorithms" /etc/ssh/ssh_config; then
|
||||
echo " HostKeyAlgorithms $SSH_HOST_KEY_ALGORITHMS" >> /etc/ssh/ssh_config
|
||||
fi
|
||||
sed "s/Ciphers.*/Ciphers $SSH_CIPHERS/g" /etc/ssh/ssh_config
|
||||
sed -i "s/Ciphers.*/Ciphers $SSH_CIPHERS/g" /etc/ssh/ssh_config
|
||||
if ! grep -q "Ciphers " /etc/ssh/ssh_config; then
|
||||
echo " Ciphers $SSH_CIPHERS" >> /etc/ssh/ssh_config
|
||||
fi
|
||||
sed "s/MACs.*/MACs $SSH_MACS/g" /etc/ssh/ssh_config
|
||||
sed -i "s/MACs.*/MACs $SSH_MACS/g" /etc/ssh/ssh_config
|
||||
if ! grep -q "MACs " /etc/ssh/ssh_config; then
|
||||
echo " MACs $SSH_MACS" >> /etc/ssh/ssh_config
|
||||
fi
|
||||
|
||||
# Create ssh keys
|
||||
if [ ! -f ~/.ssh/id_ed25519 ]; then
|
||||
ssh-keygen -t ed25519 -o -a 100
|
||||
fi
|
||||
if [ ! -f ~/.ssh/id_rsa ]; then
|
||||
ssh-keygen -t rsa -b 4096 -o -a 100
|
||||
fi
|
||||
|
||||
ssh_remove_small_moduli
|
||||
echo 'configure_ssh_client' >> $COMPLETION_FILE
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue