Sponsored Content
Full Discussion: Using telnet inside a ksh
Top Forums Shell Programming and Scripting Using telnet inside a ksh Post 302375122 by Jidma on Thursday 26th of November 2009 02:19:21 PM
Old 11-26-2009
you're right it's easier.
but actually i had a problem using rlogin, it takes a long time before returning an error:

Code:
prompt $ rlogin XX.XX.XX.XX
::ffff:XX.XX.XX.XX: Connection refused
prompt $ telnet XX.XX.XX.XX
Trying XX.XX.XX.XX...
Connected to XX.XX.XX.XX.
Escape character is '^]'.

login:

but you know what, it's because i was using rlogin on the same machine, i guess that was the problem.
Thank you very much, i'm gonna switch back to "rlogin" Smilie

---------- Post updated at 02:19 PM ---------- Previous update was at 02:03 PM ----------

actually the was never the problem (rlogin to own machine)
do you know what could cause the "Connection refused" problem when using rlogin instade of telnet ?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

ksh telnet script

I am trying to write a ksh script of using telnet. On server1, I have a script that wants to telnet to server2 and run it on server2. Then after finish, brings back information to server1. Is it possible? How can I write it on ksh? Any feekback is appreciated. (5 Replies)
Discussion started by: rwunwla
5 Replies

2. UNIX for Advanced & Expert Users

telnet with ksh

please i need to make telnet in an script but i cant use delay into the instruction because i dont know how many time takes an instruction to compleate in the other computer.How can i do? is there any form to do that?? please help sorry for my english.... (1 Reply)
Discussion started by: taboaspedro
1 Replies

3. Shell Programming and Scripting

telnet with ksh

please i need to make telnet in an script but i cant use delay into the instruction because i dont know how many time takes an instruction to compleate in the other computer.How can i do? is there any form to do that?? please help sorry for my english.... (2 Replies)
Discussion started by: taboaspedro
2 Replies

4. Shell Programming and Scripting

expr inside a ksh script Solaris

Hi; If I do something like this. dftotalsize=0;export dftotalsize;df -k | grep \/db001 | awk '{print $4}' | while read theinput \ ; do export $theinput; dftotalsize=`expr $dftotalsize + $theinput`; export dftotalsize; echo $dftotalsize; done ; echo `expr $dftotalsize \/ 1024 \/ 1024 "GB" Is... (4 Replies)
Discussion started by: myjess
4 Replies

5. Shell Programming and Scripting

Exit statement ignored inside KSH function

Hi All, I have multiple functions in my script and I'm trying to capture stdout from some of them, but I also do some error checking in them (in the functions that output something to their stdout that needs capturing) and I need to be able to end the entire script with an error message. ... (2 Replies)
Discussion started by: gkubok
2 Replies

6. Shell Programming and Scripting

KSH: Test telnet and exit

Hi, I need to do a test Telnet in KSH and if the connection is good then disconnect the telnet session with out logging in and without exiting the shell script. Example output of a good connection: $telnet xxx.xx.xx.xxx xxxx Trying xxx.xx.xx.xxx... Connected to xxx.xx.xx.xxx. Escape... (1 Reply)
Discussion started by: calex
1 Replies

7. Shell Programming and Scripting

Using Perl Inside KSH

Hi there, I am new to Perl and KSH. The system I am using picks up the KSH scripts and uses them in a batch job control system. I am trying to set a variable from a perl command #!/bin/ksh -eaxp #******************************************************************************* # Testing... (5 Replies)
Discussion started by: SaadLive
5 Replies

8. Shell Programming and Scripting

Perl variables inside Net::Telnet::Cisco Module doesn't work

I am writing perl script to configure Cisco device but Variables inside Net::Telnet::Cisco Module doesn't work and passed to device without resolving. Please advise. here is a sample of script: use Net::Telnet::Cisco; $device = "10.14.199.1"; ($o1, $o2, $o3, $o4) = split(/\./,$device);... (5 Replies)
Discussion started by: ahmed_zaher
5 Replies

9. Shell Programming and Scripting

Using Sed to do a substitution inside ksh

I'm trying to do an ls from inside of a ksh script. I loop through the results one line at a time and attempt to do a substitution using sed to convert YYYYMMDD from the older files into the newer files. Basically sometimes the ETL load runs over midnight and half the files are off by one day... (3 Replies)
Discussion started by: Calbrenar
3 Replies

10. Shell Programming and Scripting

Problem while displaying(cat) file content inside telnet loop .

Hi Team, Not getting the file output inside my email which i am sending from unix box. . Please refer the below code : #!/bin/sh { sleep 5 echo ehlo 10.56.185.13 sleep 3 echo mail from: oraairtel@CNDBMUREAPZP02.localdomain sleep 3 echo rcpt to: saurabhtripathi@anniksystems.com... (1 Reply)
Discussion started by: tripathi1990
1 Replies
rlogin(1c)																rlogin(1c)

Name
       rlogin - remote login

Syntax
       rlogin rhost [-ec] [-8] [-L] [-l username]
       rhost [-ec] [-8] [-L] [-l username]

Description
       The command connects your terminal on the current local host system, lhost, to the remote host system, rhost.

       Each  host  has	a  file  which contains a list of rhosts with which it shares account names.  The host names must be the standard names as
       described in When you use the command to login as the same user on an equivalent host, you do not need to specify a password.

       You can also have a private equivalence list in a file .rhosts in your login directory.	Each line in this file should  contain	the  rhost
       name and a username separated by a space, giving additional cases where logins without passwords are permitted.	If the originating user is
       not equivalent to the remote user, then the remote system prompts for a login and password as in

       To avoid security problems, the .rhosts file must be owned by either the remote user or root and it may not be a symbolic link.

       Your remote terminal type is the same as your local terminal type, which is specified  by  your	environment  TERM  variable.   Except  for
       delays,	all  echoing takes place at the remote site so the rlogin is transparent.  Flow control by and <CTRL/Q>, and flushing of input and
       output on interrupts are handled properly.  The optional argument -8 allows an eight-bit input data path at all times.	Otherwise,  parity
       bits are stripped except when the remote site's stop and start characters are other than and <CTRL/Q>.  A tilde followed by a dot (~.) on a
       separate line disconnects from the remote host, where the tilde (~) is the escape character.  Similarly, a tilde followed  by  <CTRL/Z>	(~
       <CTRL/Z>), where is the suspend character, suspends the rlogin session.

       Substitution  of  the  delayed-suspend  character,  which  is normally <CTRL/Y>, for the suspend character suspends the send portion of the
       rlogin, but allows output from the remote system.  A different escape character may be specified by the -e option.  There is no space sepa-
       rating this option flag and the argument character.

Options
       -8		   Allows an 8-bit input data path at all times.

       -ec		   Uses the specified character as the escape character.  If not specified, uses a tilde (~).

       -l username	   Logs you in as the specified user, not as your user login name.

       -L		   Runs session in litout mode.

Files
       /usr/hosts/*	   for rhost version of the command

See Also
       rsh(1c)

																	rlogin(1c)
All times are GMT -4. The time now is 11:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy