remsh ? rlogin? rhost? r?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers remsh ? rlogin? rhost? r?
# 1  
Old 08-09-2001
remsh ? rlogin? rhost? r?

what should i use if i want to run a shell script from a remote host where in it requires me to enter a username and a password which is different from my present login and run a shell located in that server? should the script located on the local or remote end? something that will do something like this:

server1:/home/usrinquirer>xhost +
access enabled blah! blah! blah!
server1:/home/usrinquirer>rlogin server2
password:(ENTER)
login:usrman
password:password
...
...
server2:/home/usrman>date
server2:/home/usrman>sh server2.sh

i've tried including rlogin in the script but how can i change from one user from another? i've tried using rlogin server2 -l usrman/password (and a like with remsh) but it did not work, if i remove password it will give me an error "login incorrect". what will i do?

thanks.
inquirer
# 2  
Old 08-09-2001
To enable remote logins without asking password, you must configure rhosts. you must create a file named .rhosts in the user's home dir containing the hostname of the machine you want to to alow remote login. man rhosts woud help you. About your scripts, if you want only to execute scripts in remote hosts, try using rsh. man rsh can help you.

Any questions, tell me.

HTT
# 3  
Old 08-10-2001
details please...

i tried to read man page of rhosts but still unable to understand that thingy... i've never tried this before so could you please help me on this? can you give me some example where in i can do exactly what i meant in my first question? please? i need this very much in order to perform many stuffs in the office. appreciate your assistance Smilie
inquirer
# 4  
Old 08-14-2001
Remote Server : - ABC
Local Server :- XYZ

User in ABC :- john
User in XYZ :- rex

U are logged in as rex in XYZ and want to connect to ABC as john

So wat u do
XYZ> rlogin ABC -l john
Password:
ABC> finger
Check out wat u have in the (where) field for the current (tty)
Lets say u get
Login Name TTY Idle When Where
lhuang lihong huang dtlocal 10 Tue 18:46 a.b.c.d

ABC> vi .rhosts ( make sure u are in home dir of john)

enter the following in there

a.b.c.d(The where field above) rex

Save it

ABC> exit
Connection Closed
XYZ>rlogin ABC
Connected
ABC>

Any Doubts?



Last edited by DPAI; 08-15-2001 at 11:04 AM..
# 5  
Old 08-15-2001
i just got off from work and tried your suggestion but when i tried to finger the remote host it gave me this:

Login Name TTY Idle When Bldg. Phone

usrno1 usrno1 *te 1:00 Wed 17:41
usrrex REX101 *4 1d Tue 10:30

the where field is blank and does not contain any information Smilie i tried some variation but it just not seem to work how should i do this? how about the password because everytime we remote log it ask for the password regardless if you are trying to remote log the same user but different server. please help Smilie

Last edited by inquirer; 08-15-2001 at 01:44 PM..
inquirer
# 6  
Old 08-15-2001
Ok Then use -- from -- field from the output of
%> w



Last edited by DPAI; 08-15-2001 at 02:48 PM..
# 7  
Old 08-15-2001
Not every platform gives host information in the w/finger output.

To the original poster: put the IP address of machine XYZ in the .rhosts file on ABC.

Example:

192.168.0.1 rex

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Remsh

Hello All, I am on HP-UX. Problem is that my remote script behaves different depending on execution method. Method1 (Remote execution): remsh remoteserver /home/myscript.sh Method2 (Local execution): remoteserver :/home#sh myscript.sh In method 2, I can succesfully set timestamp with... (6 Replies)
Discussion started by: mrcrowley
6 Replies

2. UNIX for Advanced & Expert Users

Remsh command

Hi Can any 1 tell me how to use REMSH command with example actually i wanted to run the following command on different severs thru script "df -k .| tail -1 | tr -s ' ' ' ' | cut -d ' ' -f5" :) please reply ASAP.:) (3 Replies)
Discussion started by: maddy_07
3 Replies

3. Shell Programming and Scripting

Remsh

Hi All, Im using remsh to execute shell script on remote server. And this script gets called from another AIX server. My code is: remsh $rHost -l $rUser -n "export JAVA_HOME=/usr/java6_64_SR7; export ORACLE_HOME=/oravl01/oracle/11.1.0.7; export... (3 Replies)
Discussion started by: AB10
3 Replies

4. UNIX for Dummies Questions & Answers

remsh options

Hi All, I want to know all the options that are used for command remsh. And also the prerequisites like entries in .rhosts file. Can anybody share the link or document? thanks. (1 Reply)
Discussion started by: AB10
1 Replies

5. Shell Programming and Scripting

remsh variables

Hi, I have script. #!/bin/sh -x CD=masterservice remsh 132.196.133.185 -l root './export $CD > test.output' rcp root@132.196.133.185:test.output But I receive the following error. + remsh 132.196.133.185 -l root ./export $CD > test.output To make it work, I remove the ' signs.... (1 Reply)
Discussion started by: mr_andrew
1 Replies

6. Solaris

define .rhost file for tape backup to remote host

howdy experts, i am using 2 server- Solaris 5.9 i have tape device attached with 1 of my solaris server. But others not. # modinfo|grep tape 152 13d43e4 1333c 33 1 st (SCSI tape Driver 1.231) now i want to Backup DATA file and System File in Tape Drive. How do I take data and... (3 Replies)
Discussion started by: thepurple
3 Replies

7. Shell Programming and Scripting

how to use remsh to duplicate all...

hi , Any idea how to use remsh to duplicate whatsoever ( / ) from host1 to host2 across network with root? Regards, (0 Replies)
Discussion started by: rauphelhunter
0 Replies

8. Solaris

remsh working one way

host Solaris 5.9 E250 host-name: sunsrv1 remote Solaris 5.8 Netra 250 host_name: sspfs_svr i am able to remsh (or rsh)from remote to host like ; $ remsh sunsrv1 uname -n sunsrv1 but opposite way not possible; # remsh sspfs_svr ls sspfs_svr: Connection refused OR # rsh -l username... (2 Replies)
Discussion started by: xramm
2 Replies

9. UNIX for Dummies Questions & Answers

rhost problems

dear unix gurus, trying to search for this thread in the forum but can't seem to find any of them. just would like to post 2 questions: 1) if there are spaces in the .rhosts file will it cause problems for users who try to run the program/ script? :confused: 2) does the .rhosts file be... (10 Replies)
Discussion started by: lweegp
10 Replies

10. UNIX for Dummies Questions & Answers

remsh

i m try to do remsh i need to know what are the step to define the user and password i try .rhosts it give me operator:/export/home/operator>remsh billmed ps -ef permission denied just for testing (3 Replies)
Discussion started by: kazanoova2
3 Replies
Login or Register to Ask a Question