Detailed OpenSSH configuration file

If you regularly need to SSH into multiple remote systems every day, you will find it difficult to remember all the remote IP addresses, different usernames, non-standard default ports and various command line options.

One option is to create a bash alias (alias laobai='ssh username@xxxx') for each remote server connection. However
, there is another better and simpler solution to this problem.

OpenSSH allows you to set up configuration files for each user, and you can store different SSH options for each remote computer.

1. Install the OpenSSH client

Install the OpenSSH client on Linux, macOS, and windows systems.

In most cases, Linux will come with:

apt install openssh-client(ubuntu)
yum install openssh-clients(centos7)
dnf install openssh-clients(centos8)

In most cases, macOS will come with it (telnet is not supported, but it can be installed).

The windows10 system can also be installed now: Settings -> Application -> Optional Features -> OpenSSH client.

After installation, you can use the ssh -V parameter to output the version number to check whether the installation is successful.

OpenSSH server configuration file:

[root@centos-client ~]# vim /etc/ssh/sshd_config

Guess you like

Origin blog.csdn.net/qq_35029061/article/details/130915530