08-10-2001
Hostname order
A tip if you are having problems using remsh etc commands even when you think your .rhosts files are setup correctly:
Use both short and FQDN (fully qualified domain names) in your .rhosts files:
jumbo root
jumbo.amazon.com root
Also the actual *order* of short and FQDN can be important:
jumbo.amazon.com root
jumbo root
HP-UX's MC/Serviceguard is known to have issues with this.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All
Does anyone have any idea on how I can create a loop when running a remote shell. e.g.
If I want to execute the following command remotely and log the output locally
for x in `lsvg`
do
lsvg $x
done > /tmp/myfile
I have tried
rsh myhost -l root for x in `lsvg`^Jdo^Jlsvg $x^Jdone... (1 Reply)
Discussion started by: jhansrod
1 Replies
2. UNIX for Dummies Questions & Answers
Please I need your help.
I want to run remotely a unix shell that run a java process, from a Visual Basic Client.
Thanks
mac33
:) (4 Replies)
Discussion started by: mac33
4 Replies
3. Programming
Hello,
Where can I find some Remote shell program in UNIX Environment?
thx (5 Replies)
Discussion started by: kennethchow
5 Replies
4. Shell Programming and Scripting
Hi,
root@air01a>SS7Manager -status
This command gives correct output. But when I write this in script and run it on SUNMC (which can connect to air01 and by default login as root). It gives the error "SS7manager not found" or "can not open". Here is the scripts.
#!/bin/sh
rsh air01a... (4 Replies)
Discussion started by: lastkey
4 Replies
5. HP-UX
hi how can i make remote shell to hp-ux from linux? (1 Reply)
Discussion started by: dereckfun
1 Replies
6. Shell Programming and Scripting
Hi All,
i have two machines like x and y . my requirement is i should connect to machine Y from x through ssh connection . and do some operation such as copy and move and delete files in Y machine .
i tried with this code but it is doing in machine x only . and i need to exit from Y when... (1 Reply)
Discussion started by: rateeshkumar
1 Replies
7. Shell Programming and Scripting
I m trying to run a batch script in remote desktop which executes unix commands on the unix server...the problem is i wnt the output in HTML format.so in my batch script i m giving the cmd like
ssh hostname path ksh HC_Report.ksh>out.html
...but it generates the HTML file in
remote desktop .i... (2 Replies)
Discussion started by: navsan
2 Replies
8. Shell Programming and Scripting
I solved my issue by using the following code
#!/bin/bash
function GET_STATUS {
#values Active Passive Failed
ssh -a localhost '/home/user/fakecommand.sh'
}
STATE="unknown"
until ]
do
echo $STATE
sleep 5
STATUS=`GET_STATUS`
echo $STATUS | grep Active &&... (1 Reply)
Discussion started by: $scipt_Kid
1 Replies
9. Shell Programming and Scripting
Geeks,
Could you please help me out in my script and identify the missing piece. I need to check/get the exit status of a remote command executed on remote host through script and send out an email when process/processes is/are not running on any/all server(s).
Here's the complete... (5 Replies)
Discussion started by: lovesaikrishna
5 Replies
10. Shell Programming and Scripting
Hello i am having an issue with bash script and this is the code
now=$(cat hosts1.txt | awk '{print $2;}')
while read n ;do
ssh root@$now 'useradd test1; echo -e "test1\ntest1" | passwd test1 && echo "test1 ALL=(ALL:ALL) ALL" >> /etc/sudoers'
When i execute only part with cat, it... (8 Replies)
Discussion started by: tomislav91
8 Replies
LEARN ABOUT NETBSD
rhosts
HOSTS.EQUIV(5) BSD File Formats Manual HOSTS.EQUIV(5)
NAME
hosts.equiv, .rhosts -- trusted remote hosts and host-user pairs
DESCRIPTION
The hosts.equiv and .rhosts files list hosts and users which are ``trusted'' by the local host when a connection is made via rlogind(8),
rshd(8), or any other server that uses ruserok(3). This mechanism bypasses password checks, and is required for access via rsh(1).
Each line of these files has the format:
hostname [username]
The hostname may be specified as a host name (typically a fully qualified host name in a DNS environment) or address, ``+@netgroup'' (from
which only the host names are checked), or a ``+'' wildcard (allow all hosts).
The username, if specified, may be given as a user name on the remote host, ``+@netgroup'' (from which only the user names are checked), or a
``+'' wildcard (allow all remote users).
If a username is specified, only that user from the specified host may login to the local machine. If a username is not specified, any user
may login with the same user name.
EXAMPLES
somehost
A common usage: users on somehost may login to the local host as the same user name.
somehost username
The user username on somehost may login to the local host. If specified in /etc/hosts.equiv, the user may login with only the same
user name.
+@anetgroup username
The user username may login to the local host from any machine listed in the netgroup anetgroup.
+
+ +
Two severe security hazards. In the first case, allows a user on any machine to login to the local host as the same user name. In the
second case, allows any user on any machine to login to the local host (as any user, if in /etc/hosts.equiv).
WARNINGS
The username checks provided by this mechanism are not secure, as the remote user name is received by the server unchecked for validity.
Therefore this mechanism should only be used in an environment where all hosts are completely trusted.
A numeric host address instead of a host name can help security considerations somewhat; the address is then used directly by iruserok(3).
When a username (or netgroup, or +) is specified in /etc/hosts.equiv, that user (or group of users, or all users, respectively) may login to
the local host as any local user. Usernames in /etc/hosts.equiv should therefore be used with extreme caution, or not at all.
A .rhosts file must be owned by the user whose home directory it resides in, and must be writable only by that user.
Logins as root only check root's .rhosts file; the /etc/hosts.equiv file is not checked for security. Access permitted through root's
.rhosts file is typically only for rsh(1), as root must still login on the console for an interactive login such as rlogin(1).
FILES
/etc/hosts.equiv Global trusted host-user pairs list
~/.rhosts Per-user trusted host-user pairs list
SEE ALSO
rcp(1), rlogin(1), rsh(1), rcmd(3), ruserok(3), netgroup(5)
HISTORY
The .rhosts file format appeared in 4.2BSD.
BUGS
The ruserok(3) implementation currently skips negative entries (preceded with a ``-'' sign) and does not treat them as ``short-circuit'' neg-
ative entries.
BSD
November 26, 1997 BSD