The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
question (regular expression related) metalwarrior UNIX for Dummies Questions & Answers 1 02-03-2008 11:51 PM
signals related question ninjanesto High Level Programming 2 02-13-2007 02:43 PM
a math related question jahjah Shell Programming and Scripting 9 09-13-2004 10:56 AM
1st post here! directory related question ( // )... MrOrange UNIX for Dummies Questions & Answers 2 06-26-2002 09:21 PM
A Question related to the net sskb UNIX for Dummies Questions & Answers 8 10-03-2001 09:37 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-23-2008
neerajrathi2 neerajrathi2 is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 3
One Question related to alias

Hello,
I have created following alias in csh

lab 'rlogin -l user23 complab23'

but problem is complab23 does not allow automatic login by checking .rhosts file. So after typing lab on command line I have to type complicate password and if wrong password is typed thrice then account gets locked.

Could someone suggest me another solution ?
Is there any way to create shell script which will login to this complab23 server usign user23 account and then return control to my terminal,. something llike below

rlogin -l user23 complab23 << EOF
passw0rd!!!
EOF
command which will make shell interactive and return control to terminal.
  #2 (permalink)  
Old 01-23-2008
Tytalus's Avatar
Tytalus Tytalus is offline Forum Advisor  
echo {1..9}^2\;|bc
  
 

Join Date: Jun 2003
Location: Scotland
Posts: 431
Ok - caveat - storing passwords in a file in plaintext is a bad idea....but if you want to do this you can use expect.

The following code should work:

Code:
#!/usr/bin/expect
spawn rsh -l user23 complab23
match_max 100000 
expect "assword: "
send "<insert your password here>\r"
interact 
exit
  #3 (permalink)  
Old 01-23-2008
ennstate ennstate is offline
Registered User
  
 

Join Date: Mar 2007
Location: Chennai
Posts: 222
Use ~/.rhosts

You could try creating an .rhosts file under your home directory of the target machine with name of the machine from which you attempt to make the connection.

Code:
cat /home/user/.rhosts
HostFromWhichDoRlogin YourUsername
Pls see man rhosts from more info

Thanks
Nagarajan G
  #4 (permalink)  
Old 01-23-2008
System Shock's Avatar
System Shock System Shock is offline Forum Advisor  
Registered User
  
 

Join Date: May 2006
Location: Tau Ceti V
Posts: 521
ssh with keys
  #5 (permalink)  
Old 01-24-2008
adderek adderek is offline
Registered User
  
 

Join Date: Sep 2007
Location: Poland
Posts: 110
Thumbs up

Like you got this above:
SSH with Authentication keys
This is how you should do it. And remember - if you keep your password in plain text then it is almost like you are creating a public account where anyone can log-in.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:49 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0