Sponsored Content
Top Forums Shell Programming and Scripting Run a loop that will search for a file to thousand machine and know who owns the file Post 303035505 by Chubler_XL on Sunday 26th of May 2019 10:44:01 PM
Old 05-26-2019
You could also try:

Code:
for host in ....
do
  printf "\nHost: %s\n" "$host"
ssh "$host" 2>/dev/null <<'EOF'
   ls -l $(awk -F: '{ print $6"/.ssh/id*" }' /etc/passwd) 2> /dev/null
EOF
done

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to search a keyword within a file using a for loop

hi guys i have a problem here, im trying to stablish a relationship between a text file and an input user for example the script is going to prompt the user for some football team and what the script is going to do is return the colums in which that input is located so far this is what i have ... (6 Replies)
Discussion started by: lucho_1
6 Replies

2. Shell Programming and Scripting

How to run a loop for assigning strings which are present in a file to an array

Hi Forum, I am struggling with the for loop in shell script. Let me explain what is needed in the script. I have a file which will conatin some strings like file1 place1 place2 place3 checkpoint some other text some more text Now what my requirement is the words ... (2 Replies)
Discussion started by: siri_14
2 Replies

3. Shell Programming and Scripting

Search two file types within a for loop

I need to search for a csv and a dat file within a for loop then output them to a log table. I can do it individually but I want them together. See below code: check csv count=0 for file in $(ls *.csv) ; do count=`expr $count + 1` ... (4 Replies)
Discussion started by: Pablo_beezo
4 Replies

4. Shell Programming and Scripting

File 1 Column 1 value search in File 2 records, then loop?

Summary: I planned on using Awk to grab a value from File 1 and search all records/fields in file 2. If there is a match in File 2, print the first column value of the record of the match of File2. Continue this search until the end of file 2. Once at the end of file 2, grab the next value in... (4 Replies)
Discussion started by: Incog
4 Replies

5. Shell Programming and Scripting

Need help to run query in loop for all acct nbr in a file..

I have a txt file with contents of acct nbr's like: 22222222222 33333333333 33445566778 I need to write a script which takes each acct nbr in the file and run the query like: select seq_nbr from event where acct_nbr='22222222222' and the query's output should be passed to a... (0 Replies)
Discussion started by: Rajesh Putnala
0 Replies

6. Shell Programming and Scripting

Need help to run query in loop for all acct nbr in a file..

I have a txt file with contents of acct nbr's like: 22222222222 33333333333 33445566778 I need to write a script which takes each acct nbr in the file and run the query like: select seq_nbr from event where acct_nbr='22222222222' and the query's output should be passed to a... (2 Replies)
Discussion started by: Rajesh Putnala
2 Replies

7. Shell Programming and Scripting

Run script to export the data to ixf file in loop

Hi, I am trying to export the data to an .ixf file. I have read the table names from a .dat file and those table name should be passed to the select * from schema.TABLENAME query . I am trying the below loop while read TABLE; do db2 EXPORT TO ~/data_export/$TABLE.ixf OF IXF MESSAGES... (5 Replies)
Discussion started by: vikyalex4
5 Replies

8. Shell Programming and Scripting

Bash loop to search file

In the bash when the user inputs an id to search for the bash currently closes, and if a match is found outputs a new file (match.txt). Is it possible to have not close the bash but rather, on the screen "searching for match" and if a match is found "match found in line.." is displayed... (3 Replies)
Discussion started by: cmccabe
3 Replies

9. Shell Programming and Scripting

Get vaule and from file and need to run in loop

Hi All, I have a command which provide this output symaccess -sid 624 show PG_E36_PG6P -type port |grep FA FA-5G:1 FA-6G:0 FA-11G:0 FA-12G:1 I need to use the value in loop like this (5 Replies)
Discussion started by: ranjancom2000
5 Replies

10. Shell Programming and Scripting

Search file in the whole machine

friends I need to find a file as I can do this is on AIX I find the function find (2 Replies)
Discussion started by: tricampeon81
2 Replies
ssh-keysign(1M)                                                                                                                    ssh-keysign(1M)

NAME
ssh-keysign - ssh helper program for host-based authentication SYNOPSIS
ssh-keysign ssh-keysign is used by ssh(1) to access the local host keys and generate the digital signature required during host-based authentication with SSH protocol version 2. This signature is of data that includes, among other items, the name of the client host and the name of the client user. ssh-keysign is disabled by default and can be enabled only in the global client configuration file /etc/ssh/ssh_config by setting Host- basedAuthentication to yes. ssh-keysign is not intended to be invoked by the user, but from ssh. See ssh(1) and sshd(1M) for more information about host-based authen- tication. /etc/ssh/ssh_config Controls whether ssh-keysign is enabled. /etc/ssh/ssh_host_dsa_key /etc/ssh/ssh_host_rsa_key These files contain the private parts of the host keys used to generate the digital signature. They should be owned by root, readable only by root, and not accessible to others. Because they are readable only by root, ssh-keysign must be set-uid root if host-based authentication is used. ssh-keysign will not sign host-based authentication data under the following conditions: o If the HostbasedAuthentication client configuration parameter is not set to yes in /etc/ssh/ssh_config. This setting cannot be overri- den in users' ~/.ssh/ssh_config files. o If the client hostname and username in /etc/ssh/ssh_config do not match the canonical hostname of the client where ssh-keysign is invoked and the name of the user invoking ssh-keysign. In spite of ssh-keysign's restrictions on the contents of the host-based authentication data, there remains the ability of users to use it as an avenue for obtaining the client's private host keys. For this reason host-based authentication is turned off by default. See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWsshu | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ ssh(1), sshd(1M), ssh_config(4), attributes(5) AUTHORS
Markus Friedl, markus@openbsd.org HISTORY
ssh-keysign first appeared in Ox 3.2. 9 Jun 2004 ssh-keysign(1M)
All times are GMT -4. The time now is 02:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy