rlogin from Shell script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting rlogin from Shell script
# 1  
Old 05-18-2006
rlogin from Shell script

I am logged into an AIX Unix box. From there I want to remotely login to remotely login to an HP-UX Unix box and want to execute a command that will create a file. I want to get the file to the AIX box. Can someon eplease advise how to automate that in a shell script? At the first step I want to automate the rlogin/ rsh command so that it does not ask password of the remote machine.
Can someone please help me?
asutoshch
# 2  
Old 05-18-2006
if you are considering using the rlogin, you may choose to use "rsh" instead, as it is much easier if you are just running a script. To copy you can use "rcp".

In order to avoid the password etc. You should read up on trusted hosts. Here is something for starts

--------------------------------------
The remote host allows access only if at least one of the following conditions
is satisfied:

o The local user ID is not the root user, and the name of the local host is
listed as an equivalent host in the remote /etc/hosts.equiv file.
o If either the local user ID is the root user or the check of
/etc/hosts.equiv is unsuccessful, the remote user's home directory must
contain a $HOME/.rhosts file that lists the local host and user name.

Although you can set any permissions for the $HOME/.rhosts file, it is
recommended that the permissions of the .rhosts file be set to 600 (read and
write by owner only).
-------------------------------------

However there are some security concerns with rlogin, rsh, and rcmd but they are simplest and easiest to set up.
# 3  
Old 05-19-2006
Good alternatives are ssh (for shell) and scp (for remote copy.) Once you get sshd up and running, scp, sftp, slogin, etc. will all work over ssh (including X tunneling over ssh - really neat - at work I use cygwin X server on my Windows laptop and tunnel X programs to my desktop)
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to eliminate files .rlogin

Hi guys, I'm try making to script for eliminate files rlogins. path1='/home/*' for i in `cat /etc/passwd |awk -F: '{print $6}'`; do if test "$i" = "$path1"; then echo $i cd $i if ; then echo "$i/.rhosts detectado"|mail -s "rhosts" root ... (14 Replies)
Discussion started by: nena_redbalon
14 Replies

2. Shell Programming and Scripting

rlogin and script

I am writing a script to do rlogin to another system and execute commands on the remote system, i can successfully login to the remote system but the commands are not sent. i can only use rlogin to get to the remote system. what can i do? (6 Replies)
Discussion started by: aydj
6 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. Shell Programming and Scripting

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... (4 Replies)
Discussion started by: asadlone
4 Replies

6. Shell Programming and Scripting

rlogin inside a c-shell script

Hi Forumers, Sorry if it's really simple, but I couldn't find a way out. :( I've to do something like this in a script (csh): <some commands, variable settings, scripts> rlogin different_server <some commands, variable settings, scripts> After "rlogin", it shows the prompt of the... (5 Replies)
Discussion started by: sumitgarg
5 Replies

7. Cybersecurity

not allow rlogin

does anyone know how to stop rlogin to my sunsolaris so I have 2 machines...I can not telnet one becouse that is not allowed but I can telnet the other and do rlogin to first one..I want to stop that.. so.. telnet A from C machine - works telnet B from C machine - does not work but... (3 Replies)
Discussion started by: amon
3 Replies

8. Shell Programming and Scripting

rlogin

I'm comparing a table from two databases on two different servers to check for equality. 1. How do I use rlogin from a script , is it like this ? rlogin -l $username $server1 where $username and $server1 are passed from the command line. 2.create a copy of that table, compress it and... (3 Replies)
Discussion started by: seaten
3 Replies

9. UNIX for Dummies Questions & Answers

rlogin

Hi, I have a script and need to use rlogin to access "server1". As there will be different servers used and there will be different usernames and passwords. Is it possible to pass the server name, username and password as arguments on the command line and the script work from there. ... (2 Replies)
Discussion started by: seaten
2 Replies

10. 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
Login or Register to Ask a Question