Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you telnet to ssh?

Tags:

http

ssh

tcp

telnet

I know you can telnet and negotiate with HTTP server by using HTTP protocol standards - for 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 could I do the same with the SSH protocol?

like image 593
Ba7a7chy Avatar asked Jul 18 '12 19:07

Ba7a7chy


People also ask

Can Telnet be tunneled through SSH?

To tunnel a Telnet session through an SSH connection, you must establish the SSH connection, then configure Reflection to redirect Telnet through the SSH tunnel. To do this, you must create two Reflection settings files, one to configure and start SSH, and one to configure and start the Telnet session.

What is difference between Telnet and SSH?

Telnet transfers the data in simple plain text. On other hand SSH uses Encrypted format to send data and also uses a secure channel. No authentication or privileges are provided for user's authentication. As SSH is more secure so it uses public key encryption for authentication.

Is Telnet faster than SSH?

Telnet is obviously faster, as the protocol is much more trivial and there is no key exchange and no encryption involved; Telnet is less vulnerable.


1 Answers

Try hitting an SSH server with telnet on port 22. You get the first message, but nothing else that's useful. 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. You can hit whatever port is using a different plain-text protocol and decode it in your head, as with HTTP. SSH encrypts everything, so using telnet to connect to an SSH server would prove a little hard 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.
like image 177
dwerner Avatar answered Oct 20 '22 21:10

dwerner