LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-09-2011, 09:48 AM   #1
graziano1968
Member
 
Registered: Sep 2004
Posts: 223

Rep: Reputation: 30
telnet alternative


Hello

I was using

telnet mydomain.com 25
and
telnet mydomain.com 80

to check every some minute the status of port 25 and 80 for my domain .

Now my datacenter uninstalled "telnet" , have I some alternative
to telnet linux command please ?

Thank you!
 
Old 10-09-2011, 10:36 AM   #2
joemon83
Member
 
Registered: Jan 2009
Posts: 71

Rep: Reputation: 11
try this: nc mydomain.com 80
 
Old 10-09-2011, 10:51 AM   #3
graziano1968
Member
 
Registered: Sep 2004
Posts: 223

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by joemon83 View Post
try this: nc mydomain.com 80
not available too ; something else more common ?
 
Old 10-09-2011, 11:07 AM   #4
joemon83
Member
 
Registered: Jan 2009
Posts: 71

Rep: Reputation: 11
just check if you have the nmap command in your machine.....
 
Old 10-09-2011, 11:14 AM   #5
graziano1968
Member
 
Registered: Sep 2004
Posts: 223

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by joemon83 View Post
just check if you have the nmap command in your machine.....
no , I Centos 5 and I can't find an alternative to telnet .
 
Old 10-09-2011, 11:19 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,747

Rep: Reputation: 7982Reputation: 7982Reputation: 7982Reputation: 7982Reputation: 7982Reputation: 7982Reputation: 7982Reputation: 7982Reputation: 7982Reputation: 7982Reputation: 7982
Quote:
Originally Posted by graziano1968 View Post
Hello
I was using

telnet mydomain.com 25 and telnet mydomain.com 80

to check every some minute the status of port 25 and 80 for my domain. Now my datacenter uninstalled "telnet" , have I some alternative to telnet linux command please ?
How about using wget? Something like:
Code:
wget <hostname or IP>:<port> | grep "connected"
If you find "connected", the service is running.
 
1 members found this post helpful.
Old 10-09-2011, 12:33 PM   #7
graziano1968
Member
 
Registered: Sep 2004
Posts: 223

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by TB0ne View Post
How about using wget? Something like:
Code:
wget <hostname or IP>:<port> | grep "connected"
If you find "connected", the service is running.
it seems good, THANK you
 
Old 10-09-2011, 11:15 PM   #8
joemon83
Member
 
Registered: Jan 2009
Posts: 71

Rep: Reputation: 11
yea..that was gud...but wget can't be used for the smtp port, 25
 
Old 10-10-2011, 12:40 AM   #9
graziano1968
Member
 
Registered: Sep 2004
Posts: 223

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by joemon83 View Post
yea..that was gud...but wget can't be used for the smtp port, 25
in fact wget looks always at port 80 I think . Still in troubles
 
Old 10-10-2011, 11:05 AM   #10
graziano1968
Member
 
Registered: Sep 2004
Posts: 223

Original Poster
Rep: Reputation: 30
no alternative ?
 
Old 10-10-2011, 11:32 AM   #11
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by graziano1968 View Post
I was using telnet mydomain.com 25 and telnet mydomain.com 80 to check every some minute the status of port 25 and 80 for my domain. Now my datacenter uninstalled "telnet" , have I some alternative to telnet linux command please ?
If I read this correctly your goal is not to use telnet but to be able to monitor services. If you monitor services then you will probably also restart them automagically on and be notified of certain conditions. While homebrewn kludges are nice they're usually not that configurable (say switching to HTTPS) or extensible (add NTP, a specific web-based application path, etc, etc) and that's why people before you already invented the wheel. So unless you want to re-invent the wheel, why not use something like Monit, Hobbit or even Nagios?..
 
1 members found this post helpful.
Old 10-10-2011, 07:47 PM   #12
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,747

Rep: Reputation: 7982Reputation: 7982Reputation: 7982Reputation: 7982Reputation: 7982Reputation: 7982Reputation: 7982Reputation: 7982Reputation: 7982Reputation: 7982Reputation: 7982
Quote:
Originally Posted by joemon83 View Post
yea..that was gud...but wget can't be used for the smtp port, 25
Wrong...please re-read my post. You have to SPECIFY the port, like "wget localhost:443", or "wget 10.11.12.13:25"
 
Old 10-10-2011, 08:22 PM   #13
rameshshihora
LQ Newbie
 
Registered: Jul 2007
Posts: 16

Rep: Reputation: 0
Hey,

If you are just only concern to check the port avaibility then why dont you use the "nmap <IP address> -sT -p <port>". This will simply gives you the status of open ports on the respective remote servers.

Thanks & Regards,
Ramesh Shihora
 
Old 10-10-2011, 11:27 PM   #14
joemon83
Member
 
Registered: Jan 2009
Posts: 71

Rep: Reputation: 11
Quote:
Originally Posted by TB0ne View Post
Wrong...please re-read my post. You have to SPECIFY the port, like "wget localhost:443", or "wget 10.11.12.13:25"
Yea....may be u r rite.....if the requirement is just to check if a port is open, you can use the port no. along with the domain name or IP. But it will try to send http request to that port, even if wget is made to connect to a non-http port.
Anyway I think graziano1968, can use this to check the availability of a remote port.

[root@localhost ~]# wget linux-web.com:25
--2011-08-21 19:48:14-- http://linux-web.com:25/
Resolving linux-web.com... 202.65.135.196
Connecting to linux-web.com|202.65.135.196|:25... connected.
HTTP request sent, awaiting response... 200 No headers, assuming HTTP/0.9
Length: unspecified
Saving to: `index.html'

[ <=> ] 294 --.-K/s in 0s

2011-08-21 19:48:16 (13.4 MB/s) - `index.html' saved [294]

[root@localhost ~]# vi index.html
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# cat index.html
220-server102.hostcats.com ESMTP Exim 4.69 #1 Tue, 11 Oct 2011 09:49:31 +0530
220-We do not authorize the use of this system to transport unsolicited,
220 and/or bulk e-mail.
500 unrecognized command
500 unrecognized command
500 unrecognized command
500 Too many unrecognized commands
 
Old 10-11-2011, 12:44 AM   #15
graziano1968
Member
 
Registered: Sep 2004
Posts: 223

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by rameshshihora View Post
Hey,

If you are just only concern to check the port avaibility then why dont you use the "nmap <IP address> -sT -p <port>". This will simply gives you the status of open ports on the respective remote servers.

Thanks & Regards,
Ramesh Shihora

The problem is that nmap does not come preinstalled in all OS (such as red hat , centos) . I am searching an alternative to telnet
which is available in almost all major linux distro such as Red Hat/Centos.

---------- Post added 10-11-11 at 05:44 AM ----------

Quote:
Originally Posted by rameshshihora View Post
Hey,

If you are just only concern to check the port avaibility then why dont you use the "nmap <IP address> -sT -p <port>". This will simply gives you the status of open ports on the respective remote servers.

Thanks & Regards,
Ramesh Shihora
Ok thank you, I will test again this way .
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to telnet to Linux Host inspite of installing telnet-server RPM - Need Help sinamdar Linux - Software 7 04-11-2009 07:09 AM
Can't end telnet servcie in xinetd when close remote telnet cliend forcely zeroneworld Linux - Newbie 2 12-09-2007 08:47 PM
Can't end telnet servcie in xinetd when close remote telnet cliend forcefully. zeroneworld Linux - General 1 12-06-2007 07:17 AM
GNU Telnet -b missing - any alternative edge5519 Linux - Networking 2 09-19-2005 08:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration