Sponsored Content
Top Forums Shell Programming and Scripting Ssh to an array of servers in a for loop Post 302852467 by disedorgue on Wednesday 11th of September 2013 03:49:03 PM
Old 09-11-2013
Hi,
Try with -n -o BatchMode=yes options:
-n for manage stdin
-o BatchMode=yes for no ask password

Regards.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

connecting servers using SSH - help needed

Hi all, I have a script written successfully and tuned by our members, now I am trying to execute this script from a taxi server. My aim is I want to connect to four servers via ssh where I want to ran a script or run some commands and write the output to a file in the Taxi server. I... (12 Replies)
Discussion started by: senthilkumar_ak
12 Replies

2. UNIX for Advanced & Expert Users

ssh: require passphrase from some servers but not others

We have a number of linux clusters running Oracle. The clusters require that all member nodes have promptless/passwordless login through ssh (ie. the keys were created with null passphrases). We also have a management server that is not a member of any cluster but routinely connects to nodes of all... (3 Replies)
Discussion started by: Squeakygoose
3 Replies

3. UNIX for Dummies Questions & Answers

SSH into multiple linux servers

Hi All, Okay, I need help. I need to ssh in to multiple linux servers execute certain commands and get them to email and print on the screen when the script is being executed. So below is my script. Its not working :-(. #!/bin/bash #linux/UNIX box with ssh key based login... (7 Replies)
Discussion started by: xytiz
7 Replies

4. Shell Programming and Scripting

Array Variable being Assigned Values in Loop, But Gone when Loop Completes???

Hello All, Maybe I'm Missing something here but I have NOOO idea what the heck is going on with this....? I have a Variable that contains a PATTERN of what I'm considering "Illegal Characters". So what I'm doing is looping through a string containing some of these "Illegal Characters". Now... (5 Replies)
Discussion started by: mrm5102
5 Replies

5. IP Networking

Cant SSH Solaris servers

Hi all. Im working in a telco Environment and recently setup a new server. The other servers are a combination of Solaris + Linux machines. Using my new server , I can ping all other servers ( solaris + redhat linux ) but the issue lies where I try to ssh. I can only successfully ssh linux... (3 Replies)
Discussion started by: Junaid Subhani
3 Replies

6. Shell Programming and Scripting

Iterate array using loop over ssh

A simple script: #!/bin/bash test=test test1=(test1 test2 test3) echo ${test1 } ssh server 'echo '$test'; echo '${test1 }' ; echo '${test1}' ; for m in $(seq 1 $(echo '${test1 }' | tr " " "\n" | wc -l)); do echo $m ; echo '${test1}'; done'Here is the result: test1 test2 test3 testing... (5 Replies)
Discussion started by: mharald
5 Replies

7. Shell Programming and Scripting

awk loop using array:wish to store array values from loop for use outside loop

Here's my code: awk -F '' 'NR==FNR { if (/time/ && $5>10) A=$2" "$3":"$4":"($5-01) else if (/time/ && $5<01) A=$2" "$3":"$4-01":"(59-$5) else if (/time/ && $5<=10) A=$2" "$3":"$4":0"($5-01) else if (/close/) { B=0 n1=n2; ... (2 Replies)
Discussion started by: klane
2 Replies

8. UNIX for Dummies Questions & Answers

Ssh not working to one server from any of the servers

Hello, I tried ssh in debug mode and below is the debug snippet.ssh to a host is not working from any of the hosts No credentials cache found debug1: Miscellaneous failure No credentials cache found debug1: Next authentication method: publickey debug1: Offering RSA public key:... (7 Replies)
Discussion started by: Vishal_dba
7 Replies

9. UNIX for Beginners Questions & Answers

ssh multiple servers

Hi folks. I'm pretty new to unix, while I'm learning a lot I'm finding bash scripting quite confusing. Im sure it's not really, my head just hasn't clicked with it. Anyway, I need a script to loop the ip addresses stored in a file and run a "pgrep <process>" and return the pid or some... (2 Replies)
Discussion started by: MuntyScrunt
2 Replies

10. Shell Programming and Scripting

Find active SSH servers w/ ssh keys on LAN

Hi, I am trying to complete my bash script in order to find which SSH servers on LAN are still active with the ssh keys, but i am frozen at this step: #!/bin/bash # LAN SSH KEYS DISCOVERY SCRIPT </etc/passwd \ grep /bin/bash | cut -d: -f6 | sudo xargs -i -- sh -c ' && cat... (11 Replies)
Discussion started by: syrius
11 Replies
SECRET-TOOL(1)							   User Commands						    SECRET-TOOL(1)

NAME
secret-tool - Store and retrieve passwords SYNOPSIS
secret-tool store --label='Label' {attribute} {value} ... secret-tool lookup {attribute} {value} ... secret-tool clear {attribute} {value} ... secret-tool search [--all]{attribute} {value} ... DESCRIPTION
secret-tool is a command line tool that can be used to store and retrieve passwords. Each password is stored in an item. Items are uniquely identified by a set of attribute keys and values. When storing a password you must specify unique pairs of attributes names and values, and when looking up a password you provide the same attribute name and value pairs. STORE
To store a password run secret-tool with the store argument. You must also specify a label for the passward with the --label argument. This label will be displayed in the password manager. Make sure to pass a unique set of attributes names and values when storing a password. If the attributes match an already existing item, it will be updated instead of creating a new item. If invoked from a terminal or tty, then the password to store will be prompted for and only one line will be accepted. A password to store can also be piped in via stdin. The password will be the contents of stdin until EOF. If you provide a newline via stdin it will be stored as part of the password. LOOKUP
To lookup a password run secret-tool with the lookup argument. Specify the same same attribute names and value pairs that you passed when storing the password. If multiple items match the attribute provided, then the first password that is already unlocked will be returned. If necessary an item will be unlocked. When printing the password to a terminal or tty, an extra newline will be added after the password. CLEAR
To remove a password run secret-tool with the clear argument. Specify the same attirbute name and value pairs that you passed when storing the password. All unlocked items that match the attributes will be removed. SEARCH
This command searches for and prints details on matching items in secret service. Specify the same attribute and value pairs that you passed in when storing the password. You can use the following options: --all Return all matching results, rather than just the one of the matches. Without this option, the first unlocked match returned from the service will be printed. --unlock Unlock items that are locked and then print out their details. Without this option, locked items are skipped. EXIT STATUS
On success 0 is returned, a non-zero failure code otherwise. EXAMPLES
Example 1. Storing, retrieving, and clearing a password $ secret-tool store --label='My password' key1 value1 key2 value2 Password: My password $ secret-tool lookup key1 value1 key2 value2 My password $ secret-tool clear key1 value1 key2 value2 XDG
SECRET-TOOL(1)
All times are GMT -4. The time now is 06:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy