Telnet


 
Thread Tools Search this Thread
Special Forums IP Networking Telnet
# 1  
Old 03-18-2014
Telnet

Hey everyone. Something has been bothering me. The telnet program, while I know is insecure, offers a ton of functionality. I can literally test any port's availability. I can send commands to web servers, and email servers, and it's a great toubleshooting tool. can any of this be done with SSH? I know ssh allows you to securely log into a remote computer, and that has it's purpose, but can ssh, do what telnet can in the troubleshooting?
# 2  
Old 03-18-2014
Many people, myself included, use a telnet client for troubleshooting purposes precisely because it can do things ssh cannot do.
# 3  
Old 03-18-2014
Telnet is an insecure way to login to something, not because it's "telnet", but because it's a raw network connection which sends pure text. In other words, it's not telnet that's insecure, it's the way you use it. It's just a raw network connection. That it's totally raw allows it to connect to HTTP, FTP, POP3, etc with equal ease. It can't tell the difference. It's just a socket() call.

ssh isn't useful as a diagnostic tool the way telnet is because it has a complex protocol. You can telnet into FTP, HTTP, and POP3 servers to see what's going on, and it won't care that one sends 'HELLO', another sends '404 not found', another prints 'LOGIN', or whatever -- it just dumps it all to the screen as-is. SSH will expect a key exchange or something and crash out when given anything else.

FTP via telnet is no safer than FTP with an FTP client, also. It's not some weird property of telnet which makes telnet insecure -- it's that it's a raw network connection which anything can peek on. FTP is also usually raw. (sftp is not ftp, it's ssh -- it just looks like it from the client point of view. ftps, which is pretty rare, actually is FTP, tunneled in an SSH connection.)

Another useful and common utility is netcat, usually "nc", which is a raw connection like telnet but contains many more options for automatic use.

Last edited by Corona688; 03-18-2014 at 02:49 PM..
These 2 Users Gave Thanks to Corona688 For This Post:
# 4  
Old 03-18-2014
Yes, netcat is probably better about hanging around, as telnet will exit if stdin eof, so to see output, you need to linger:
Code:
#!/usr/bin/ksh
 
(
sleep 2
 
echo 'GET / HTTTP/1.0
 
 
'
sleep 10
)|telnet www.ibm.com 80 >index-www.ibm.com

This User Gave Thanks to DGPickett For This Post:
# 5  
Old 03-21-2014
Thanks for the reply to this! Corona, when you use telnet to connect to an http server like apache or something, what does the web server see? Does it think it's communicating with a web browser?
# 6  
Old 03-25-2014
You can type in the things that browsers do, but it is all by hand; the tool telnet is just a TCP pipeline. Everything before the first blank line is the http header. But otherwise, it has no clue past the http version on the GET/POST line. Since HTTP/1.0 does not allow persistent connections and multiple queries on a connection, I stick with that.
# 7  
Old 03-27-2014
Quote:
Originally Posted by Lost in Cyberia
Thanks for the reply to this! Corona, when you use telnet to connect to an http server like apache or something, what does the web server see?
Sorry, I missed this question. It sees the same thing it always does, a TCP connection to port 80, it can't tell it apart from a 'real' web browser.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Telnet

Hi, Need some help on exiting the telnet session from the script. #!/bin/ksh telnet <ip> it would print some text and it would ask for a username and pwd. I jus need to capture the text and i need to come out of the telnet session. is it possible without expect ? (6 Replies)
Discussion started by: giri_luck
6 Replies

2. UNIX for Dummies Questions & Answers

Difference Between Krb5-telnet And Ekrb5-telnet

Hi, I want to know the difference between these two services. Both are under xinetd. Both are used for enabling and disabling Telnet service. So, can somebody please explain me the difference between the two ? Thanks in advance :) (0 Replies)
Discussion started by: kashifsd17
0 Replies

3. UNIX for Dummies Questions & Answers

Automatically login in the telnet from present telnet

Hi, I was writing one script which includes to switch to the another telnet automatically from the present telnet server. I was using rlogin but firstly it takes the same user name of the present telnet and secondly it is prompting for the password. But i want to switch to the another telnet... (2 Replies)
Discussion started by: Prateek
2 Replies

4. Shell Programming and Scripting

Webpage to Telnet via Perl and Expect: Telnet problem?

Somewhat long story: I have a simple Perl CGI script that uses Expect to Telnet to a device and grab some data, and then spits it back to Perl for display on the Webpage. This works for many devices I've tried, but one device just fails, it keeps rejecting the password on this device, only... (1 Reply)
Discussion started by: jondo
1 Replies

5. SCO

Telnet

Hello. How can I limit the number of telnet connections in order that from the same IP address it can support at the maximun two simultaneus meetings on SCO Openserver 5.0.7 ? Thanks. (2 Replies)
Discussion started by: jag
2 Replies

6. AIX

Telnet and su -

I have some AIX 4.3 machines which have disabled root telnet access. When you run su - once logged on the machine requests a password and if one is supplied correctly it asks for another users password. How do I configure this? Any help is appreciated. Thank you (0 Replies)
Discussion started by: uXion
0 Replies

7. Programming

telnet

hello sir and all my friends i have a serious problems in creating a telnet protocol with c-program in unix. if any one have this program then please reply me on this mail address. email address removed (4 Replies)
Discussion started by: abhijit deka
4 Replies

8. Shell Programming and Scripting

telnet

Now my task is there are two servers A and B. i only can put unix script in server A and database is on server B. can I write a script in serer A which could telnet to server B and run the script which include sql script and save the output file in server A. did I make my problem clear? (2 Replies)
Discussion started by: YoYo
2 Replies

9. UNIX for Advanced & Expert Users

Telnet

Hi, When we use telnet (from unix workstation or windows) to remotely access the Unix server, the environment variables such as: DISPLAY, TERM, LOGNAME are communicate to the telnet server during the telnet session negotiation. By default these variables are passed to the server. We can... (1 Reply)
Discussion started by: vtran4270
1 Replies

10. UNIX for Advanced & Expert Users

telnet

Hi All, I have written a script called findwho.sh findwho.sh in Development Server ======== who -M>x I want to copy the file findwho.sh into Production Server and run this script on it then output file x copy back to the Development Server 1) Every time ftp findwho.sh to... (4 Replies)
Discussion started by: krishna
4 Replies
Login or Register to Ask a Question