Add conditional SSH config construction
This commit is contained in:
parent
b7886df942
commit
dfb0c08a0f
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
taskwarrior/.task/*.data
|
||||
ssh/.ssh/extra.conf
|
||||
|
||||
@ -21,6 +21,15 @@ apply_dotfile vim
|
||||
apply_dotfile ruby
|
||||
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
|
||||
|
||||
restore_from_adoption
|
||||
|
||||
@ -1 +1 @@
|
||||
EnableEscapeCommandline yes
|
||||
Include ~/.ssh/extra.conf
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user