Can you use telnet for ssh?

I know that you cannot connect to telnet and negotiate with an HTTP server using HTTP protocol standards

Example:

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: can I do the same with the SSH protocol?

+6
source share
2 answers

SSH: SSH-protoversion-softwareversion SP comments CR LF

Example: SSH-2,0-billsSSH_3.6.3q3

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

+4
source

Try pushing the SSH server with telnet to port 22. You will receive the first message, but nothing more useful. Just "protocol mismatch" and the connection is closed.

The telnet client is useful as a tool in this way because it uses the plaintext protocol. You can hit any port using a different plain text protocol and decode it in your head, as is the case with HTTP. SSH encrypts everything, so using telnet to connect to an SSH server will be a little difficult to read with the naked eye.

 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. 
+6
source

Source: https://habr.com/ru/post/920825/


All Articles