I'm need to connect to another host in a script using the telnet command. How do I pass the login and password to be able to connect to the other host from within the script? (10 Replies)
Hi,
How to write a script to perform telnet/ftp operation.
Also please refer some site to get reference about shell scripting.
Thanks in advance
-Arun. (1 Reply)
I am trying to use telnet in shell script but getting following error
error
Connected to crmapp00.agf.ca.
Escape character is '^]'.
Connection closed by foreign host.
Script
#!/bin/ksh
PATH=/usr/sbin/:/usr/bin:/usr/ucb:/etc:/usr/local/bin:.
telnet HOSTNAME <<SCRIPT
user userid... (9 Replies)
Hi All,
I was trying to use telnet in a script to access a certain processor on a certain port to view some processes. The problem is that when I use telnet the output is displayed for me.
The script is:
#!/bin/sh
cd /ahmed/ezzat/
rm ss7trace.log
touch ss7trace.log
chmod 755... (3 Replies)
Hi Guys,
How do I write the script for the following
telnet 192.168.1.100 9002
if the result is less than 1 second. The script should say as port open
if the result takes more than 3 seconds. The script should display as port closed.
Thanks,
Charan (1 Reply)
Hi all,
I would like to write a ad hoc shell script that would allow me to do some telnet tests to multiple IP's and ports at the same time . So, I want to determine which one is successful and which one fails. So, basically I would like the shell to spawn the telnet test and to break out of... (3 Replies)
Hello,
I wrote a script for doing telnet.However the requirement got changed and now I have to write a telnet script that will
1. Do the telnet from all the virtual ips in a box(Ex: x.x.x.x is the box ip, and x.x.x.1,x.x.x.2 etc are virtual ips associated with that box.)
2. The port range... (0 Replies)
Hello,
I wrote a script for doing telnet.However the requirement got changed and now I have to write a telnet script that will
1. Do the telnet from all the virtual ips in a box(Ex: x.x.x.x is the box ip, and x.x.x.1,x.x.x.2 etc are virtual ips associated with that box.)
2. The port range... (3 Replies)
Discussion started by: coolkid
3 Replies
LEARN ABOUT OPENSOLARIS
cports
cports(1M) System Administration Commands cports(1M)NAME
cports - expand host names into <host, server, port> triples
SYNOPSIS
$CLUSTER_HOME/bin/cports hostname [hostname...]
DESCRIPTION
The cports utility expands the hostname arguments into a list of <host, server, port> triples. The returned information is used to access
the serial port consoles of the named hosts by way of the terminal server returned in the triples.
If an entry for serialports has been made in the /etc/nisswitch.conf file, then the order of lookups is controlled by that entry. If there
is no such file or no such entry, then the nameservice look up order is implicitly nis files.
EXAMPLES
Example 1 Using the cports Command
If the /etc/serialports file contains the entry:
pepsi soda-tc 5002
the following command:
% cports pepsi
prints the following string:
pepsi soda-tc 5002
This information can be used by the telnet(1) command to remotely access pepsi's console:
% telnet soda-tc 5002
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWccon |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
SEE ALSO telnet(1), cconsole(1M), ccp(1M), chosts(1M), crlogin(1M), cssh(1M), ctelnet(1M), serialports(4), attributes(5)Sun Cluster 3.2 8 Sep 2007 cports(1M)