- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: running script to test telnet connectivity
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2007 02:14 AM
02-23-2007 02:14 AM
One of my colleagues wants to write a script that tests for connectivity on a specific port.
Obviously if you do a telnet you need to do a control c to break that connection so how can I manage this test within a script.
Cheers
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2007 02:22 AM
02-23-2007 02:22 AM
Solutionhttp://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1052758
Seems to come down to:
>>> The trick here is how to send the ctrl-]. Use this key sequence: ctrl-v ctrl-].
You can use ctrl-v and then any other ctrl sequence to get that exact sequence.
Note that cut-n-paste from this forum will NOT grab the ctrl-C or ctrl-]!! <<<
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2007 02:47 AM
02-23-2007 02:47 AM
Re: running script to test telnet connectivity
you can use expect to mimik pretty much any input. Even works for scripted passwd.
Available from:
http://hpux.connect.org.uk/hppd/hpux/Tcl/expect-5.43/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2007 07:25 PM
02-25-2007 07:25 PM
Re: running script to test telnet connectivity
why snd ctrl-c when a simple quit is enougth?
> telnet localhost 25<
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2007 08:11 PM
02-25-2007 08:11 PM
Re: running script to test telnet connectivity
This sounds like a job for Nmap:
Nmap download:
http://hpux.connect.org.uk/hppd/hpux/Networking/Admin/nmap-3.93/
Here is the output from a port-scan on port 25:
root@servera:/> nmap -p 25 serverb
Starting nmap V. 2.53 by fyodor@insecure.org ( www.insecure.org/nmap/ )
Interesting ports on serverb:
Port State Service
25/tcp open smtp
Nmap run completed -- 1 IP address (1 host up) scanned in 0 seconds
Regards, Kasper