Difference between revisions of "/etc/ssh/ssh config"

From wikieduonline
Jump to navigation Jump to search
Line 2: Line 2:
 
* <code>/etc/ssh/ssh_config</code>
 
* <code>/etc/ssh/ssh_config</code>
  
Basic example:
+
=== Basic example ===
 
  Host your_machine_name
 
  Host your_machine_name
 
     Hostname (IP or hostname)
 
     Hostname (IP or hostname)
Line 8: Line 8:
 
     [[IdentityFile]] ~/.ssh/id_ed25519
 
     [[IdentityFile]] ~/.ssh/id_ed25519
  
Complete example:
+
=== Complete example ===
 
  Host machine_name_for_ssh_client
 
  Host machine_name_for_ssh_client
 
     [[ProxyJump]] YOUR_SERVER_TO_USE_AS_JUMPSERVER
 
     [[ProxyJump]] YOUR_SERVER_TO_USE_AS_JUMPSERVER
Line 16: Line 16:
 
     [[IdentityFile]] ~/.ssh/id_ed25519
 
     [[IdentityFile]] ~/.ssh/id_ed25519
  
[[Configure OpenSSH to reuse ssh connections]]
+
=== [[Configure OpenSSH to reuse ssh connections]] ===
 
  [[ControlMaster]] auto
 
  [[ControlMaster]] auto
 
  [[ControlPath]] ~/.ssh/sockets/%r@%h-%p
 
  [[ControlPath]] ~/.ssh/sockets/%r@%h-%p

Revision as of 09:54, 16 September 2021

Basic example

Host your_machine_name
    Hostname (IP or hostname)
    User USERNAME_TO_CONNECT
    IdentityFile ~/.ssh/id_ed25519

Complete example

Host machine_name_for_ssh_client
    ProxyJump YOUR_SERVER_TO_USE_AS_JUMPSERVER
    Hostname (IP or hostname)
    Port 22
    User USERNAME_TO_CONNECT
    IdentityFile ~/.ssh/id_ed25519

Configure OpenSSH to reuse ssh connections

ControlMaster auto
ControlPath ~/.ssh/sockets/%r@%h-%p
ControlPersist 36000


OpenSSH Changelog


To allow connection to some Cisco IOS devices:

Related terms

See also

Advertising: