大网数据广告活动
服务器运维问答

Should I add 'Protocol 2' to my sshd_config?

· 52CE 我爱测

I recently installed debian 11.3 in a VM for testing, and also installed SSH Server during the expert install. And I saw that the default sshd_config file has no Protocol option set. Then I read e.g. at https://linux.die.net/man/…

问题原文

原帖链接 · archygriswald · CC BY-SA 4.0

I recently installed debian 11.3 in a VM for testing, and also installed SSH Server during the expert install. And I saw that the default sshd_config file has no Protocol option set. Then I read e.g. at https://linux.die.net/man/5/sshd_config:

Protocol: Specifies the protocol versions sshd(8) supports. The possible values are '1' and '2'. Multiple versions must be comma-separated. The default is ''2,1''. Note that the order of the protocol list does not indicate preference [...]

So question 1: Does this mean by default my ssh server is serving the old and insecure version 1??

If yes, then question 2: Should I add 'Protocol 2' to my sshd_config?

已采纳解答

原帖链接 · Z0OM · CC BY-SA 4.0

New standard is ssh protocol version 2 | SSH-2.

You don't need to do anything on debian 11 you are working with SSH-2

Don't need to set 2 for SSH-2 or 1 for SSH-1 or 2,1 for SSH-2 and SSH-1 in the sshd_config

Run this in your terminal, if you have not set a port -p or a key -i:

ssh -1 [USER]@[IP]

Normal you will receive this:

SSH protocol v.1 is no longer supported

An this for SSH2, but you don't need it normally because it is the standard:

ssh -2 [USER]@[IP]

I think even if you try to set SSH1 and you restart the sshd without error it will not work/ not supported any more.

Check this too:

How to check SSH protocol version on Linux

History of SSH

History of SSH

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2022-07-15)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。