prevent install from nuking the ssh config

whole-command-tab-completion
bretello 2020-02-14 16:37:44 +01:00
parent 4d64de1fa4
commit 0663467577
1 changed files with 11 additions and 7 deletions

View File

@ -87,28 +87,32 @@ function create_ssh_config {
fi
exec 3>&1 # save stdout file descriptor
exec 1>$ssh_config # redirect everything below to the $ssh_config file
exec 1>>$ssh_config # redirect everything below to the $ssh_config file
if [[ "$modifyssh" != "n" ]]
then
echo "# brethil's dotfiles setup start"
echo 'TCPKeepAlive=yes'
echo 'ServerAliveCountMax=6'
echo
echo "## Uncomment to enable compression for all ssh sessions"
echo '#Compression=yes'
echo
echo '## Uncomment the following to enable ssh ControlMaster and ssh session persistence'
echo '#ControlMaster auto'
echo '#ControlPath /tmp/%r@%h:%p'
echo '#ControlPersist yes'
echo
echo 'Host *'
echo 'ServerAliveInterval 300'
echo ' ServerAliveInterval 300'
echo
echo '## Enable the following if you want to use the rmate textmate remote'
echo "#Host *"
echo "#RemoteForward 52698 localhost:52698"
echo "# RemoteForward 52698 localhost:52698"
echo
echo '## Enable the following if you want to use a reverse ssh tunnel to use mecp command on remote hosts'
echo "Host *"
echo "Remoteforward 2222 localhost:22"
echo "#Host *"
echo "# Remoteforward 2222 localhost:22"
echo
echo '# end of brethil dotfiles setup #'
exec 1>&3 # restore stdout