The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Rlogin shanmugam UNIX for Dummies Questions & Answers 1 01-25-2007 06:39 AM
rlogin seaten Shell Programming and Scripting 3 05-13-2005 02:01 AM
rlogin seaten UNIX for Dummies Questions & Answers 2 05-12-2005 05:42 AM
Rlogin??? merlin UNIX for Dummies Questions & Answers 1 01-14-2003 05:42 AM
rsh & rlogin Inbal UNIX for Dummies Questions & Answers 2 04-24-2002 11:02 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 05-18-2008
Registered User
 

Join Date: Jun 2007
Posts: 34
rlogin

Hi all,

i need to remotely execute a couple of commands on anyother server, but rsh is not allowed. for that matter i am bound to use rlogin. so what i am trying to do in the script is :

1) rlogin asad
2) Wait for Login prompt
3) Waiting for Password Prompt
4) Once authenticated, execute the couple of commands and exit


i am stuck in the (2) and (3) point. how can i make a script wait for a username login prompt and then give it value from the script and then the password prompt and supply the way from the script.

Pl help me out in this. thanks
Reply With Quote
Forum Sponsor
  #2  
Old 05-18-2008
era era is offline
Herder of Useless Cats
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,650
If rsh is not allowed, why do you think rlogin is any better?

Can't you use ssh instead?
Reply With Quote
  #3  
Old 05-19-2008
Registered User
 

Join Date: Jun 2007
Posts: 34
hi ... well i will use ssh but it ask for password on prompt and i have to include that in the script. so can u guide me with that.
Reply With Quote
  #4  
Old 05-19-2008
era era is offline
Herder of Useless Cats
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,650
There are various ways to avoid passwords in ssh. The secure and reasonably simple way is to run public-key authentication with a key which is known by your ssh-agent; a weaker but even simpler solution is to have a key which doesn't require a password, but I'd recommend against that.
Reply With Quote
  #5  
Old 05-19-2008
Registered User
 

Join Date: Nov 2007
Location: Pune
Posts: 20
You can use expect script for that matter
expect script + ssh is better option rather then pre auth.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 12:23 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0