How to display OpenSSH daemon configuration

Display OpenSSH daemon configuration.

April 17, 2023 · milosz · OpenSSH

How to automatically add identity to the SSH authentication agent

Automatically add the identity file used by the SSH client to the OpenSSH authentication agent.

April 10, 2023 · milosz · OpenSSH

How to inspect OpenSSH configuration

Inspect OpenSSH configuration.

March 22, 2023 · milosz · OpenSSH

How to deal with too many authentication failures

Deal with the too many authentication failures error when initiating SSH connection.

March 3, 2023 · milosz · OpenSSH

How to lock OpenSSH authentication agent

Lock OpenSSH authentication agent.

December 28, 2022 · milosz · OpenSSH

How to configure OpenSSH server to use legacy public key algorithm to authenticate itself to an SSH client

Configure OpenSSH server to use legacy public key algorithm to authenticate itself to an SSH client.

October 7, 2022 · milosz · OpenSSH

How to define key expiration time in OpenSSH authentication agent

Define key expiration time in OpenSSH authentication agent.

August 5, 2022 · milosz · OpenSSH

How to automatically use jump proxy when initiating SSH connection

Automatically use jump proxy when initiating SSH connection from an external network.

July 4, 2022 · milosz · OpenSSH

How to install OpenSSH on DietPi operating system

Use internal DietPi utilities is to switch from a Dropbear to OpenSSH Server.

How to suppress SSH banner

Suppress SSH banner when executing ad-hoc commands.

April 5, 2021 · milosz · OpenSSH

How to ensure that OpenSSH client uses explicitly configured authentication identity

Ensure that OpenSSH client uses explicitly configured authentication identity even if authentication agent offers more identities.

How to perform hostname canonicalization

Perform hostname canonicalization to simplify your configuration and ease work with multiple servers.

How to match network inside SSH client configuration

Match specific network inside the SSH client configuration file using Python helper script.

How to define multiple SSH configurations for the same host

Define multiple configurations for the same host using the SSH client configuration file.

How to determine available authentication methods

Determine available authentication methods on the specified OpenSSH server.

How to inspect OpenSSH client configuration

Inspect OpenSSH client configuration to search and display configured hosts.

How to revoke specific key used to login with OpenSSH

Revoke specific key used to perform key-based login with OpenSSH utilizing simple public key revocation list or OpenSSH Key Revocation List (KRL).

How to determine which key was used to login with OpenSSH

Determine which SSH key was used to perform key-based login using public key fingerprint.

How to display message before OpenSSH authentication

Display message before OpenSSH authentication using simple built-in mechanism.

How to manage remotely forwarded SSH authentication agent

Keeping SSH authentication agent in sync across multiple servers and terminal multiplexers is not an easy task, but can be solved by using consistent socket names used to connect to the SSH authentication agent.

How to attach to tmux session over SSH

Attach to the tmux session over SSH to continue your work.

How to remotely execute shell function

Sometimes it is very convenient to define shell function and execute it remotely.

How to instantly add known_hosts entries for host and its IP address

Use simple shell function to instantly create known_hosts entries for specified host, including its IP address and remove outdated public host keys.

How to merge multiple known_hosts entries into single row

Global known_hosts file located in /etc/ssh/ssh_known_hosts and user managed ~/.ssh/known_hosts contains known host public keys. Due to its nature these files can contain multiple entries using the same key. It is not a problem, but merging entries using the same key is the first step that is necessary to inspect it visually and to verify host entries.

How to disconnect idle SSH clients

Disconnect idle SSH clients using built-in client alive mechanism.

How to remove invalid entries from known hosts file

There are rare cases when known hosts file becomes corrupted, so basic ssh utilities fail within custom built shell scripts due to ~/.ssh/known_hosts is not a valid known_hosts file error.

How to change SSH private key passphrase

From time to time I have to update passwords used to secure private keys to keep myself a bit more sane. I will demonstrate simple and straightforward way to accomplish this task.

How to create persistent reverse SSH tunnel

Sometimes I want to access a private server at home from a different network while being on the go. The easiest way to do this is to use autossh utility to create a secure and persistent reverse SSH tunnel to the publicly available server.