rlogin and telnet


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting rlogin and telnet
# 1  
Old 05-31-2009
rlogin and telnet

I want to make a script which will execute a command from a remote server like below

rlogin server1
then
telnet server2
(username, password will be given)

now execute command (it may "ls -l *.txt") and give the output

I've to do this manually but want to make it automatic
Script may be bash or perl

Please help me. I searched the forum but not get the solution.
# 2  
Old 05-31-2009
Use rsh. It can directly execute the command for you. Please search this forum for rsh.


-Devaraj Takhellambam
# 3  
Old 05-31-2009
Thanks a lot Devaraj!

If u give such link which meets my requirements it will be vary helpful for me. As I'm a beginner.

-----Post Update-----

Is there anyone to help me more?

-----Post Update-----

Is there anyone to help me more?
# 4  
Old 06-05-2009
I did it with expect script. But it shows the login prompt in the terminal. I need only the command output in the terminal nothing else Please help me.

Mr. Devaraj! I searched a lot about rsh but did not find any helpful information. Please provede me the link or give the syntax with an example

-----Post Update-----

I did it with expect script. But it shows the login prompt in the terminal. I need only the command output in the terminal nothing else Please help me.

Mr. Devaraj! I searched a lot about rsh but did not find any helpful information. Please provede me the link or give the syntax with an example
# 5  
Old 06-05-2009
I did it with expect script. thanks all
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Difference Between Krb5-telnet And Ekrb5-telnet

Hi, I want to know the difference between these two services. Both are under xinetd. Both are used for enabling and disabling Telnet service. So, can somebody please explain me the difference between the two ? Thanks in advance :) (0 Replies)
Discussion started by: kashifsd17
0 Replies

2. UNIX for Dummies Questions & Answers

Automatically login in the telnet from present telnet

Hi, I was writing one script which includes to switch to the another telnet automatically from the present telnet server. I was using rlogin but firstly it takes the same user name of the present telnet and secondly it is prompting for the password. But i want to switch to the another telnet... (2 Replies)
Discussion started by: Prateek
2 Replies

3. Solaris

rlogin help!

Guys, I'm running solaris 9 on two systems: 1 and 2, let's say. From 1, if I say rlogin 2, i can just login. No passwd prompt! From 2, if I say rlogin 1, it asks for the passwd. (able to login with a passwd) But, they both have the same config files, same set up, same network etc. What... (13 Replies)
Discussion started by: the_red_dove
13 Replies

4. Shell Programming and Scripting

script for nested rlogin and telnet

I want to write a script that rlogins to a couple machines and then from the last machine, telnet into a final machine and execute a command. So in pseudocode it would look like: rlogin host1 from host1 rlogin host2 from host2 telnet host3 from host 3 execute command The reason for the... (6 Replies)
Discussion started by: mcburke38
6 Replies

5. IP Networking

rlogin,telnet-different or same?

Hai guys, Both "rlogin" and "telnet" are used to login remote host.Is there any differece between these 2 commands? (or) are both same? Thanks (1 Reply)
Discussion started by: Felicia23
1 Replies

6. Solaris

rlogin, telnet connections timeout

Hi, I have a Sun Ultra 5 desktop with Solaris 8. When I telnet/rlogin into any other host, the connection closes after few hours of inactivity. I also have another Windows box which I use rarely. But when I telnet/rlogin into the same hosts using putty, the connection stays for days without any... (5 Replies)
Discussion started by: dr_gsb
5 Replies

7. Shell Programming and Scripting

Webpage to Telnet via Perl and Expect: Telnet problem?

Somewhat long story: I have a simple Perl CGI script that uses Expect to Telnet to a device and grab some data, and then spits it back to Perl for display on the Webpage. This works for many devices I've tried, but one device just fails, it keeps rejecting the password on this device, only... (1 Reply)
Discussion started by: jondo
1 Replies

8. UNIX for Dummies Questions & Answers

telnet, rlogin, ssh login probblem

Hello Friends, I had an IRIX box won't let me login with any IDs (even root) Telnet, Rlogin, SSh. However, I can login by single user with root ID. Telnet login >>> Connection closed by forgeign host. Rlogin >>> Connection closed SSh login >>> connection to address ???.????.???.??? ... (1 Reply)
Discussion started by: anphdula
1 Replies

9. UNIX for Dummies Questions & Answers

Rlogin???

From any computer on our network when you rlogin into one machine (this only happens on this machine) it'll hang for about 3 minutes before loggin into that machine. If your sick of waiting you can do a <ctrl> C and then it'll rlogin into the machine it is meant to BUT it wont keep the shell... (1 Reply)
Discussion started by: merlin
1 Replies

10. UNIX for Dummies Questions & Answers

rlogin & telnet

hi what is the main difference between rlogin and telnet? Or they are synonymous cheers (13 Replies)
Discussion started by: g-e-n-o
13 Replies
Login or Register to Ask a Question