Add conditional SSH config construction
This commit is contained in:
parent
582ec5aba5
commit
9780b18e08
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
taskwarrior/.task/*.data
|
taskwarrior/.task/*.data
|
||||||
|
ssh/.ssh/extra.conf
|
||||||
|
|||||||
@ -21,6 +21,15 @@ apply_dotfile vim
|
|||||||
apply_dotfile ruby
|
apply_dotfile ruby
|
||||||
apply_dotfile python
|
apply_dotfile python
|
||||||
|
|
||||||
|
|
||||||
|
# Check that SSH version is above 9.2 (where EnableEscapeCommandline was added) before conditionally adding
|
||||||
|
# a config file. This is then included in the main config
|
||||||
|
SSH_VERSION=$(ssh -V 2>&1 | cut -d',' -f 1 | cut -d '_' -f 2)
|
||||||
|
if [[ "${SSH_VERSION}" =~ ^9\.[1-9]{0,1}[2-9].*$ ]]; then
|
||||||
|
cat <<CONFIG > ssh/.ssh/extra.conf
|
||||||
|
EnableEscapeCommandline yes
|
||||||
|
CONFIG
|
||||||
|
fi
|
||||||
apply_dotfile ssh
|
apply_dotfile ssh
|
||||||
|
|
||||||
restore_from_adoption
|
restore_from_adoption
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
EnableEscapeCommandline yes
|
Include ~/.ssh/extra.conf
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user