08-22-2001
remote login through a script ( except rsh)
Hi Guys,
I'm having a problem trying to change to a different user within a script .
I want to change to a specific user and then run the subsequent commands using his previleges .
I remember having used ' su ' some years back for this , can't figure it out now !!
Help appreciated .
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
is it possible for me to have a shell script log me in to a telnet session? i have in mind something along the lines of
% telnet host < script, where the first two lines of script will be username and pass followed by a list of commands to execute on the remote host.
this doesn t work as... (4 Replies)
Discussion started by: lethe
4 Replies
2. Shell Programming and Scripting
Hello all,
I would like to login from one unix-system with a (tcsh)-script to an other unix-system.The login-procedure and the transmission of username, resp. password runs via ssh.
The problem is after logging onto the remote server once "Enter" has to be pressed, before one gets to the... (1 Reply)
Discussion started by: Juergen Paepke
1 Replies
3. Shell Programming and Scripting
Hi,
I am writing a script that will require me to perform tasks across servers. I tried to use rsh <host> "Commands..." > /dev/null 2>&1. However, I am required to execute a long series of commands after that and rsh does not seem to support this and its also insecure.
I tried to use rsh to... (5 Replies)
Discussion started by: joseph_ng
5 Replies
4. Shell Programming and Scripting
Hi,
I have a script that runs for an hour.
Have to run it on remote server and need the output it produces on the remote server to decide for failure or success.
I run it through a Autosys Job which logs the outputs, both 1 & 2.
I use the commands
1) rsh <SERVER> 'nohup /tmp/xyz.ksh &'
2)... (5 Replies)
Discussion started by: aster007
5 Replies
5. Shell Programming and Scripting
HI,
I need to write a script ..
when I run this script , will directly goto that remote machine without asking password..
Once it is entered, I needs to transfer some of the log files...
how can I proceed ? (7 Replies)
Discussion started by: hegdeshashi
7 Replies
6. Solaris
how to login with ssh to remote system with out applying the remote root/user password
with rlogin we can ujse .rhosts file
but with ssh howits possible
plz guide (2 Replies)
Discussion started by: tv.praveenkumar
2 Replies
7. Shell Programming and Scripting
Greetings, guys. I'm not much of a programmer forgive me for being a noob, because of someone leaving, I was put in an IT spot where I have to figure out a few things. Being new to Linux and programming has been a challenge.
My boss has asked me to create an automated script to connect to a 3rd... (7 Replies)
Discussion started by: giovannym
7 Replies
8. Shell Programming and Scripting
Hi all,
I am baffled on this. Solaris Irix system.:confused:
I have 4 servers all connected to one another, :b: I need to write a script line that would login on to server 1-3 ($HOST) start a script in the back ground and log off while the back ground script runs over a length of time.:eek:
... (10 Replies)
Discussion started by: weddy
10 Replies
9. Shell Programming and Scripting
#!/bin/bash
for servers in `cat ~/servers`
do
rosh -l root -n $servers 'if
then
echo $HOSTNAME
else
exit 1
fi'
done
I have few servers in the for loop that is powered off, so whenever I execute my script, it works fine if all the servers are on, but when it tries to execute the script... (1 Reply)
Discussion started by: Rojan Shakya
1 Replies
10. Shell Programming and Scripting
Hi there,
I'm trying to run a script remotely on a server in a particular directory named after hostname which already exists, my login session gets killed as soon as I run the below command. Not sure what is wrong, is there a better way to do it ?
Note: I can also use nohup command to run... (14 Replies)
Discussion started by: mbak
14 Replies
RLOGIN(1C) RLOGIN(1C)
NAME
rlogin - remote login
SYNOPSIS
rlogin rhost [ -ec ] [ -8 ] [ -L ] [ -l username ]
rhost [ -ec ] [ -8 ] [ -L ] [ -l username ]
DESCRIPTION
Rlogin connects your terminal on the current local host system lhost to the remote host system rhost.
Each host has a file /etc/hosts.equiv which contains a list of rhost's with which it shares account names. (The host names must be the
standard names as described in rsh(1C).) When you rlogin as the same user on an equivalent host, you don't need to give a password. Each
user may also have a private equivalence list in a file .rhosts in his login directory. Each line in this file should contain an rhost and
a username separated by a space, giving additional cases where logins without passwords are to be permitted. If the originating user is
not equivalent to the remote user, then a login and password will be prompted for on the remote machine as in login(1). To avoid some
security problems, the .rhosts file must be owned by either the remote user or root.
The remote terminal type is the same as your local terminal type (as given in your environment TERM variable). The terminal or window size
is also copied to the remote system if the server supports the option, and changes in size are reflected as well. All echoing takes place
at the remote site, so that (except for delays) the rlogin is transparent. Flow control via ^S and ^Q and flushing of input and output on
interrupts are handled properly. The optional argument -8 allows an eight-bit input data path at all times; otherwise parity bits are
stripped except when the remote side's stop and start characters are other than ^S/^Q. The argument -L allows the rlogin session to be run
in litout mode. A line of the form ``~.'' disconnects from the remote host, where ``~'' is the escape character. Similarly, the line
``~^Z'' (where ^Z, control-Z, is the suspend character) will suspend the rlogin session. Substitution of the delayed-suspend character
(normally ^Y) for the suspend character suspends the send portion of the rlogin, but allows output from the remote system. A different
escape character may be specified by the -e option. There is no space separating this option flag and the argument character.
SEE ALSO
rsh(1C)
FILES
/usr/hosts/* for rhost version of the command
BUGS
More of the environment should be propagated.
4.2 Berkeley Distribution May 12, 1986 RLOGIN(1C)