magit seems to open a new ssh connection for every command. This becomes very annoying especially when staging more chunks, which takes noticeable time to establish the connection for each chunk.
(from shell, I have persistent ssh connections enabled via ./ssh/config)
I am not sure whether this is a magit or a tramp thing.
But my question is:
How can I make magit re-use the ssh-connection?
EDIT:
The client is
- tramp 2.3.5.26.2
- GNU Emacs 26.1.91
- debian (testing)
- this is the tramp configuration
(add-to-list 'tramp-remote-path 'tramp-own-remote-path)
(setq tramp-default-method "ssh")
(setq tramp-inline-compress-start-size 1000000)
- this is the relevant part of my .ssh/config
## generally re-use existing connections
Host *
ControlMaster auto
ControlPath ~/.ssh/sockets/%r@%h-%p
ControlPersist 600
Host myhost1
HostName 111.11.11.1
User myuser
ForwardX11 yes
ForwardX11Timeout 596h
IdentityFile ~/.ssh/id_rsa
IdentitiesOnly yes
ForwardAgent yes
SendEnv LC_*
ServerAliveInterval 300
The server is RHEL 7.6 (Maipo)