10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello all,
i'm trying to create a report by greping a pattern on multiple remote hosts and creta a simple report,
actually i did this, is ther any better way to do this.
#!/bin/bash
for host in `cat RemoteHosts`
do
ssh $host -C 'hostname 2>&1; grep ERROR /var/log/WebServer.log.2019-09-21... (0 Replies)
Discussion started by: charli1
0 Replies
2. Solaris
Am trying to copy a tar file onto a series of remote hosts and untar it at the destination. Need to do this without having to do multiple ssh.
Actions to perform within a single ssh session via shell script
- copy a file
- untar at destination (remote host)
OS : Linux RHEL6 (3 Replies)
Discussion started by: sankasu
3 Replies
3. Shell Programming and Scripting
Dear Folks,
I am trying to read a config file contains ip and port numbers.
i want to read each line of the config file and check ssh connection is happening or not.
Kindly guide.
Config file:
abc@1.2.342 22
abc@1.2.343 22
abc@1.2.344 22
abc@1.2.345 22... (9 Replies)
Discussion started by: sadique.manzar
9 Replies
4. Shell Programming and Scripting
Hello,
I am trying to login to multiple servers and i have to run multiple loops to gather some details..Could you please help me out.
I am specifically facing issues while running for loops.
I have to run multiple for loops in else condition. but the below code is giving errors in for... (2 Replies)
Discussion started by: mohit_vardhani
2 Replies
5. Shell Programming and Scripting
so i'm doing something similar to this:
ssh myname@remotehost 'tail -800 /var/log/some.log'
Now, as you can see, this is a lot of data to be passing back and forth over a network.
Is there anything i can do to make the output smaller (zip it on the fly, compress?) and then when the data... (4 Replies)
Discussion started by: SkySmart
4 Replies
6. Shell Programming and Scripting
I have a script on about 15 hosts that I need to run for each host whenever I want (not crontab). Problem is, this script takes 5-10 mins to run for each host. Is there a way I can run the script in parallel for all the hosts instead of 1 at a time? Also, I'm remotely running the script on the... (3 Replies)
Discussion started by: mrskittles99
3 Replies
7. UNIX for Advanced & Expert Users
Hello forum:
I am curious about some output that I get using an alias <command> on a remote host and I wondered if someone could point me in the right direction.
Symptoms:
Using "ssh -qi /path/to/key root@som.ipa.ddr.ess mail" (or variation of via alias)
only gives a partial textual... (7 Replies)
Discussion started by: Habitual
7 Replies
8. Debian
Hi,
I've been looking for a way to execute a console program (is in windows but by now I accept the linux way) from a linux machine, but this program has to be opened in the remote side. Linux machine acts only as a "signaling" host. My program has to open the camera in the remote side, but only... (7 Replies)
Discussion started by: zauberberg
7 Replies
9. UNIX for Dummies Questions & Answers
Hi gurus of unix!!!!, I have a little question. I nedd your helps
The scenarios is the following
I have tree equipment that are installed in different places. I use a carrier to interconnect the equipment.
Some Port's (TCP) need to be open for an application that must be function correctly.
For... (3 Replies)
Discussion started by: andresguillen
3 Replies
10. UNIX for Advanced & Expert Users
Hi all,
Have used ftp to transfer files from remote host to localhost.
I was wondering how can I ftp into remote hosts.
for example from a unix box, connect to an external server and then ftp that file into mainframe ? I would like to avoid pulling it to unix box and then ftping to mainframe.... (1 Reply)
Discussion started by: kodermanna
1 Replies
hosts.equiv(4) File Formats hosts.equiv(4)
NAME
hosts.equiv, rhosts - trusted remote hosts and users
DESCRIPTION
The /etc/hosts.equiv and .rhosts files provide the "remote authentication" database for rlogin(1), rsh(1), rcp(1), and rcmd(3SOCKET). The
files specify remote hosts and users that are considered "trusted". Trusted users are allowed to access the local system without supply-
ing a password. The library routine ruserok() (see rcmd(3SOCKET)) performs the authentication procedure for programs by using the
/etc/hosts.equiv and .rhosts files. The /etc/hosts.equiv file applies to the entire system, while individual users can maintain their own
.rhosts files in their home directories.
These files bypass the standard password-based user authentication mechanism. To maintain system security, care must be taken in creating
and maintaining these files.
The remote authentication procedure determines whether a user from a remote host should be allowed to access the local system with the
identity of a local user. This procedure first checks the /etc/hosts.equiv file and then checks the .rhosts file in the home directory of
the local user who is requesting access. Entries in these files can be of two forms. Positive entries allow access, while negative
entries deny access. The authentication succeeds when a matching positive entry is found. The procedure fails when the first matching nega-
tive entry is found, or if no matching entries are found in either file. The order of entries is important. If the files contain both posi-
tive and negative entries, the entry that appears first will prevail. The rsh(1) and rcp(1) programs fail if the remote authentication pro-
cedure fails. The rlogin program falls back to the standard password-based login procedure if the remote authentication fails.
Both files are formatted as a list of one-line entries. Each entry has the form:
hostname [username]
Hostnames must be the official name of the host, not one of its nicknames.
Negative entries are differentiated from positive entries by a `-' character preceding either the hostname or username field.
Positive Entries
If the form:
hostname
is used, then users from the named host are trusted. That is, they may access the system with the same user name as they have on the remote
system. This form may be used in both the /etc/hosts.equiv and .rhosts files.
If the line is in the form:
hostname username
then the named user from the named host can access the system. This form may be used in individual .rhosts files to allow remote users to
access the system as a different local user. If this form is used in the /etc/hosts.equiv file, the named remote user will be allowed to
access the system as any local user.
netgroup(4) can be used in either the hostname or username fields to match a number of hosts or users in one entry. The form:
+@netgroup
allows access from all hosts in the named netgroup. When used in the username field, netgroups allow a group of remote users to access the
system as a particular local user.
The form:
hostname +@netgroup
allows all of the users in the named netgroup from the named host to access the system as the local user. The form:
+@netgroup1 +@netgroup2
allows the users in netgroup2 from the hosts in netgroup1 to access the system as the local user.
The special character `+' can be used in place of either hostname or username to match any host or user. For example, the entry
+
will allow a user from any remote host to access the system with the same username. The entry
+ username
will allow the named user from any remote host to access the system. The entry
hostname +
will allow any user from the named host to access the system as the local user.
Negative Entries
Negative entries are preceded by a `-' sign. The form:
-hostname
will disallow all access from the named host. The form:
-@netgroup
means that access is explicitly disallowed from all hosts in the named netgroup. The form:
hostname -username
disallows access by the named user only from the named host, while the form:
+ -@netgroup
will disallow access by all of the users in the named netgroup from all hosts.
Search Sequence
To help maintain system security, the /etc/hosts.equiv file is not checked when access is being attempted for super-user. If the user
attempting access is not the super-user, /etc/hosts.equiv is searched for lines of the form described above. Checks are made for lines in
this file in the following order:
1. +
2. +@netgroup
3. -@netgroup
4. -hostname
5. hostname
The user is granted access if a positive match occurrs. Negative entries apply only to /etc/hosts.equiv and may be overridden by subse-
quent .rhosts entries.
If no positive match occurred, the .rhosts file is then searched if the user attempting access maintains such a file. This file is searched
whether or not the user attempting access is the super-user. As a security feature, the .rhosts file must be owned by the user who is
attempting access. Checks are made for lines in .rhosts in the following order:
1. +
2. +@netgroup
3.
-@netgroup
4. -hostname
5. hostname
FILES
/etc/hosts.equiv system trusted hosts and users
~/.rhosts user's trusted hosts and users
SEE ALSO
rcp(1), rlogin(1), rsh(1), rcmd(3SOCKET), hosts(4), netgroup(4), passwd(4)
WARNINGS
Positive entries in /etc/hosts.equiv that include a username field (either an individual named user, a netgroup, or `+' sign) should be
used with extreme caution. Because /etc/hosts.equiv applies system-wide, these entries allow one, or a group of, remote users to access
the system as any local user. This can be a security hole. For example, because of the search sequence, an /etc/hosts.equiv file consist-
ing of the entries
+
-hostxxx
will not deny access to "hostxxx".
SunOS 5.10 23 Jun 1997 hosts.equiv(4)