# 2023-09-14 «OpenSSH client configuration file (`ssh_config`) syntax»: https://df.tips/t/1966
Host *
IdentityFile ~/.ssh/id_rsa
IdentityFile ~/.ssh/key256
# 2023-09-14
# 1) «Sets the number of server alive messages (see below)
# which may be sent without ssh(1) receiving any messages back from the server.
# If this threshold is reached while server alive messages are being sent,
# ssh will disconnect from the server, terminating the session.
# It is important to note that the use of server alive messages is very different from TCPKeepAlive (below).
# The server alive messages are sent through the encrypted channel and therefore will not be spoofable.
# The TCP keepalive option enabled by TCPKeepAlive is spoofable.
# The server alive mechanism is valuable
# when the client or server depend on knowing when a connection has become inactive.
# The default value is 3.
# If, for example, ServerAliveInterval (see below) is set to 15 and ServerAliveCountMax is left at the default,
# if the server becomes unresponsive, ssh will disconnect after approximately 45 seconds.
# This option applies to protocol version 2 only.»
# https://linux.die.net/man/5/ssh_config
# 2) «Server alive messages are useful when an SSH server has been configured to close connections
# after a period of time with no traffic
# (shared web-hosting providers that offer SSH access almost always do this for example).
# Setting these two options sends a packet every ServerAliveInterval seconds,
# for a maximum of ServerAliveCountMax times thus keeping the session alive.»
# https://serverfault.com/a/927030
ServerAliveCountMax 9999999
# 2023-09-14
# 1) «Sets a timeout interval in seconds after which if no data has been received from the server,
# ssh(1) will send a message through the encrypted channel to request a response from the server.
# The default is 0, indicating that these messages will not be sent to the server.
# This option applies to protocol version 2 only.»
# https://linux.die.net/man/5/ssh_config
# 2) «Specifies interval for sending keepalive messages to the server.
# The messages are sent through the encrypted channel,
# and serve to detect if the server has crashed or the network has gone down.»
# https://www.ssh.com/academy/ssh/config#listing-of-client-configuration-options
ServerAliveInterval 20
# 2020-05-11 https://unix.stackexchange.com/a/334440
# 2023-09-14
# «Specifies whether to send TCP keepalives to the other side.
# These operate on the level of the TCP protocol.
# Sending keepalives helps properly close the socket when the network or server goes down.
# On the other hand, without it, the connection may stay alive and any windows open,
# even if the network is down for a while.»
# https://www.ssh.com/academy/ssh/config#listing-of-client-configuration-options
# 2023-09-15
# «Specifies whether the system should send TCP keepalive messages to the other side.
# If they are sent, death of the connection or crash of one of the machines will be properly noticed.
# However, this means that connections will die if the route is down temporarily, and some people find it annoying.
# The default is ''yes'' (to send TCP keepalive messages),
# and the client will notice if the network goes down or the remote host dies.
# This is important in scripts, and many users want it too.
# To disable TCP keepalive messages, the value should be set to ''no''.»
# https://linux.die.net/man/5/ssh_config
TCPKeepAlive no
github.com/dmitrii-fediuk/cygwin-home/blob/2023-09-15/.ssh/config#L1-L55