Questions tagged [telnet]

Telnet is an old protocol for bidirectional interactive text-oriented communication with remote hosts via virtual terminals. It is defined in rfc854. On modern UNIX-like systems it is replaced with more secure and flexible SSH protocol.

Telnet is a network protocol used on the Internet or local area networks to provide a bidirectional interactive text-oriented communications facility using a virtual terminal connection. User data is interspersed in-band with Telnet control information in an 8-bit byte oriented data connection over the Transmission Control Protocol (TCP).

Shell example:

telnet website.com 80 # telnet to the website with port 80

Then HTTP methods can be executed like below

GET /index.html

More information at http://en.wikipedia.org/wiki/Telnet

2479 questions
372
votes
18 answers

Test if remote TCP port is open from a shell script

I'm looking for a quick and simple method for properly testing if a given TCP port is open on a remote server, from inside a Shell script. I've managed to do it with the telnet command, and it works fine when the port is opened, but it doesn't seem…
Yanick Girouard
  • 4,711
  • 4
  • 19
  • 26
170
votes
8 answers

get all keys set in memcached

How can I get all the keys set in my memcached instance(s)? I tried googling, but didn't find much except that PHP supports a getAllKeys method, which means it is actually possible to do this somehow. How can I get the same within a telnet…
Anshul Goyal
  • 73,278
  • 37
  • 149
  • 186
143
votes
16 answers

How to check if an email address exists without sending an email?

I have come across this PHP code to check email address using SMTP without sending an email. Has anyone tried anything similar or does it work for you? Can you tell if an email customer / user enters is correct & exists?
php-guy
  • 1,433
  • 2
  • 10
  • 6
93
votes
4 answers

How to send an HTTP request using Telnet

How to get a web page's content using Telnet? For example, the content of https://stackoverflow.com/questions.
kirillbobyrev
  • 1,619
  • 2
  • 14
  • 28
92
votes
1 answer

Difference between wscript and cscript

What is the difference between cscript and wscript? Which is best for doing Telnet and FTP automation in Windows?
rashok
  • 12,790
  • 16
  • 88
  • 100
92
votes
13 answers

Automating telnet session using Bash scripts

I am working on automating some telnet related tasks, using Bash scripts. Once automated, there will be no interaction of the user with telnet (that is, the script will be totally automated). The scripts looks something like this: # execute some…
khan
  • 2,070
  • 1
  • 17
  • 14
56
votes
1 answer

SMTP STARTTLS certificate negotitiation via telnet

I am trying to start tls in sendmail, but I do not know how to use certificate. Please suggest me way > telnet localhost 25 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 220 ESMTP Sendmail ;…
Gaurav Minocha
  • 706
  • 1
  • 5
  • 10
54
votes
7 answers

C# Telnet Library

Is there a good, free telnet library available for C# (not ASP .NET)? I have found a few on google, but they all have one issue or another (don't support login/password, don't support a scripted mode). I am assuming that MS still has not included a…
salt.racer
  • 21,903
  • 14
  • 44
  • 51
51
votes
10 answers

Connecting to smtp.gmail.com via command line

I am in the process of writing an application that sends mail via an valid GMail user ID and password. I just wanted to simulate the SMTP connection on my Windows XP command line, and when I telnet smtp.gmail.com at 465 port - I don't see any thing.…
Abhishek
  • 6,862
  • 22
  • 62
  • 79
48
votes
2 answers

HTTP keep-alive timeout

Can I specify the HTTP timeout or does the server impose a value? For example, if I do: telnet my.server.net 80 Trying X.X.X.X... Connected to my.server.net. Escape character is '^]'. GET /homepage.html HTTP/1.0 Connection: keep-alive Host:…
Ricky Robinson
  • 21,798
  • 42
  • 129
  • 185
42
votes
11 answers

Creating a script for a Telnet session?

Does anyone know of an easy way to create a script that can connect to a telnet server, do some usual telnet stuff, and then log off? I am dealing with users who are not familiar with telnet and the commands they will need to run. All I want is…
TrentCoder
  • 758
  • 1
  • 6
  • 11
37
votes
10 answers

Can't close a scpi(telnet) session with echo "^]" when I use it in a script

The use of echo-e "\ 029" does not work either. But if use strg + alt gr + ] directly in a terminal session -> it works. I have to ask my question more concretely: I connect an RF generator (AGILENT) via Telnet/SCPI. If I do this manual on terminal…
Bernie
  • 371
  • 1
  • 3
  • 4
35
votes
4 answers

What does "\r" do in the following script?

I am using following script to reboot my router using Telnet: #!/usr/bin/env python import os import telnetlib from time import sleep host = "192.168.1.1" user = "USER" password = "PASSWORD" cmd = "system restart" tn =…
Alinwndrld
  • 777
  • 2
  • 6
  • 13
33
votes
3 answers

Using conditional statements inside 'expect'

I need to automate logging into a TELNET session using expect, but I need to take care of multiple passwords for the same username. Here's the flow I need to create: Open TELNET session to an IP Send user-name Send password Wrong password? Send the…
shuckster
  • 5,279
  • 2
  • 23
  • 22
33
votes
2 answers

Python - inheriting from old-style classes

I am trying to connect via telnet to a laboratory instrument. I'd like to extend the Telnet class from the telnetlib module in the standard library, to include functions specific to our instrument: import telnetlib class…
Benjamin Hodgson
  • 42,952
  • 15
  • 108
  • 157
1
2 3
99 100