Difference between revisions of "Configure OpenSSH to reuse ssh connections"
Jump to navigation
Jump to search
| (28 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
| − | Configure [[Ssh (OpenSSH client)|ssh client]] ([[OpenSSH]]) to reuse connections | + | Configure [[Ssh (OpenSSH client)|ssh client]] ([[OpenSSH]]) to reuse connections using <code>[[ControlMaster]], [[ControlPath]] and [[ControlPersist]]</code> directives. |
| − | |||
| + | == Example == | ||
| + | [[ControlMaster]] auto | ||
| + | [[ControlPath]] [[~/.ssh/sockets/]]%C | ||
| + | [[ControlPersist]] 10h | ||
| + | #[[ControlPersist]] 36000 | ||
| + | == Change log == | ||
| + | [[OpenSSH 4.2]]: September 1, 2005 https://www.openssh.com/txt/release-4.2 | ||
| + | * Added <code>[[ControlMaster]]=auto/autoask</code> options to support opportunistic multiplexing (see the <code>ssh_config</code> manpage for details). | ||
| + | |||
| + | == Related terms == | ||
| + | * <code>[[MaxSessions]]</code> | ||
| + | * Stop session [[multiplexing]]: <code>[[ssh -O stop]]</code> | ||
| + | * https://stackoverflow.com/questions/20410252/how-to-reuse-an-ssh-connection | ||
| + | * https://en.wikibooks.org/wiki/OpenSSH/Cookbook/Multiplexing | ||
| + | * <code>[[pipelining]]</code> in <code>[[/etc/ansible/ansible.cfg]]</code> | ||
| + | * [[RemoteCommand]] | ||
| + | * [[mkdir -p]] [[~/.ssh/sockets]] | ||
== See also == | == See also == | ||
| + | * {{ssh_config}} | ||
| + | * {{sshd}} | ||
* {{OpenSSH}} | * {{OpenSSH}} | ||
[[Category:Linux]] | [[Category:Linux]] | ||
Latest revision as of 10:40, 24 July 2026
Configure ssh client (OpenSSH) to reuse connections using ControlMaster, ControlPath and ControlPersist directives.
Contents
Example[edit]
ControlMaster auto ControlPath ~/.ssh/sockets/%C ControlPersist 10h #ControlPersist 36000
Change log[edit]
OpenSSH 4.2: September 1, 2005 https://www.openssh.com/txt/release-4.2
- Added
ControlMaster=auto/autoaskoptions to support opportunistic multiplexing (see thessh_configmanpage for details).
Related terms[edit]
MaxSessions- Stop session multiplexing:
ssh -O stop - https://stackoverflow.com/questions/20410252/how-to-reuse-an-ssh-connection
- https://en.wikibooks.org/wiki/OpenSSH/Cookbook/Multiplexing
pipeliningin/etc/ansible/ansible.cfg- RemoteCommand
- mkdir -p ~/.ssh/sockets
See also[edit]
/etc/ssh/ssh_config, ~/.ssh/config (man), RemoteCommand, RequestTTY, ServerAliveInterval, UseKeychain, ForwardAgent,ProxyJump, ControlMaster, ControlPath, ControlPersistsshd,sshd logs,sshd -t,sshd -T,sshd_config,sftp,SSH_CLIENT, sshd changelog- OpenSSH (changelog):
/etc/ssh/sshd_config|/etc/ssh/ssh_config|~/.ssh/|openSSL | sshd logs|sftp|scp|authorized_keys|ssh-keygen|ssh-keyscan|ssh-add|ssh-agent|ssh|Ssh -O stop|ssh-copy-id|CheckHostIP|UseKeychain, OpenSSF, ~/.ssh/authorized_keys
Advertising: