SSH quality of life improvements.

This commit is contained in:
2025-06-11 12:03:20 -04:00
parent 2d033c055c
commit c24bdf1186
4 changed files with 7 additions and 6 deletions

View File

@ -1,4 +1,4 @@
Host gitea gitea.* github.com gitlab.com *.github.com *.gitlab.com Match canonical Host gitea,gitea.*,github.com,gitlab.com,*.github.com,*.gitlab.com
User git User git

View File

@ -3,9 +3,9 @@ rm -f ~/.ssh/search
if [ -e ${CSHENV_DIR}/ssh/ssh-search-domains ] if [ -e ${CSHENV_DIR}/ssh/ssh-search-domains ]
then then
domains=`grep "^search" /etc/resolv.conf | cut -c 8- - | cat - ${CSHENV_DIR}/ssh/ssh-search-domains | xargs` domains=`grep "^search" /etc/resolv.conf | cut -c 8- - | cat - ${CSHENV_DIR}/ssh/ssh-search-domains | sort -u | xargs`
else else
domains=`grep "^search" /etc/resolv.conf | cut -c 8- - | xargs` domains=`grep "^search" /etc/resolv.conf | cut -c 8- - | sort -u | xargs`
fi fi
if [ -z "${domains}" ] ; then exit 1; fi if [ -z "${domains}" ] ; then exit 1; fi

View File

@ -3,7 +3,7 @@
# #
# That config uses Canonicalization to emulate what your local resolver # That config uses Canonicalization to emulate what your local resolver
# does in these circumstances. # does in these circumstances.
Match exec "~/cshenv/ssh/gen-search.sh" Match !canonical !final exec "~/cshenv/ssh/gen-search.sh"
Include ~/.ssh/search Include ~/.ssh/search
# vim: ft=sshconfig # vim: ft=sshconfig

View File

@ -73,5 +73,6 @@ echo "" >> ~/.gitconfig
echo "[commit]" >> ~/.gitconfig echo "[commit]" >> ~/.gitconfig
echo " gpgSign = true" >> ~/.gitconfig echo " gpgSign = true" >> ~/.gitconfig
echo "Do not forget to add the following line at the top of your ssh config:" echo "Do not forget to add the following lines at the top and bottom of your ssh config:"
echo "Include ${CSHENV_LOCATION}/ssh/config" echo "Match all\n Include ${CSHENV_LOCATION}/ssh/config"
echo "Match all\n Include ${CSHENV_LOCATION}/ssh/config"