ubuntu ssh_config 和 sshd_config的区别

可能你安装好ubuntu后想通过SSH连接,但是怎么会连接不上?在ssh_config 里面也配置了啊,其实这个文件是用来配置的客户端的(Server自己做客户端连接别的Server的时候),搜索到一篇外文介绍

ssh_config: configuration file for the ssh client on the host machine you are running. For example, if you want to ssh to another remote host machine, you use a SSH client. Every settings for this SSH client will be using ssh_config, such as port number, protocol version and encryption/MAC algorithms.

sshd_config: configuration file for the sshd daemon (the program that listens to any incoming connection request to the ssh port) on the host machine. That is to say, if someone wants to connect to your host machine via SSH, their SSH client settings must match your sshd_config settings in order to communicate with you, such as port number, version and so on.

所以接下来你得看sshd_config 存在吗?不存在就安装

sudo apt-get install openssh-server

sudo service ssh start

ps –ef | grep ssh

posted @ 2020-09-12 11:42  LearningAlbum  阅读(1306)  评论(0编辑  收藏  举报