简体   繁体   English

你能telnet到ssh吗?

[英]Can you telnet to ssh?

I know you can telnet and negotiate with HTTP server by using HTTP protocol standards - for example: 我知道您可以使用HTTP协议标准telnet并与HTTP服务器协商 - 例如:

telnet google.com 80
Trying 173.194.70.139...
Connected to google.com.
Escape character is '^]'.
GET / HTTP.1.1
HOST: my.com

and I get in response: 我得到回应:

HTTP/1.0 400 Bad Request
Content-Type: text/html; charset=UTF-8
Content-Length: 925
Date: Wed, 18 Jul 2012 19:17:26 GMT
Server: GFE/2.0

but my question is could I do the same with the SSH protocol? 但我的问题是我可以用SSH协议做同样的事情吗?

Try hitting an SSH server with telnet on port 22. You get the first message, but nothing else that's useful. 尝试在端口22上使用telnet命中SSH服务器。您会收到第一条消息,但没有其他任何有用的消息。 Just a "Protocol Mismatch" and the connection closes. 只是一个“协议不匹配”,连接关闭。

A telnet client is useful as a tool in this way because it uses a plain-text protocol. telnet客户端以这种方式用作工具,因为它使用纯文本协议。 You can hit whatever port is using a different plain-text protocol and decode it in your head, as with HTTP. 您可以使用不同的纯文本协议命中任何端口并在头脑中对其进行解码,就像使用HTTP一样。 SSH encrypts everything, so using telnet to connect to an SSH server would prove a little hard to read with the naked eye. SSH加密所有内容,因此使用telnet连接到SSH服务器将证明用肉眼难以阅读。

telnet yoursshserver 22
Trying 50.112.5.74...
Connected to yoursshserver.
Escape character is '^]'.
SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1
something I typed
Protocol mismatch.
Connection closed by foreign host.

SSH : SSH-protoversion-softwareversion SP comments CR LF SSH:SSH-protoversion-softwareversion SP评论CR LF

Example : SSH-2.0-billsSSH_3.6.3q3 示例:SSH-2.0-billsSSH_3.6.3q3

Found at : http://www.networksorcery.com/enp/rfc/rfc4253.txt 见于: http//www.networksorcery.com/enp/rfc/rfc4253.txt

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM