11-30-2010
Renjesh,
You have mentioned that login part you have taken care already.I believe its via passwordless login.
Put the list of servernames in a file then execute the following
USER=<name>
for SERV in `cat servernames`
do
ssh $USER@$SERV best1,ls /opt/bmc/Patrol3/*/best1 > somefile
done
This could be simple one but if you don't ve password less login setup you need to type the password for every server manually otherwise go for a perl CPAN module (Net::SSH)
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I am new to this forum and unix too. I have just started learning unix. As I was going through the first chapter, I read that unix is multitasking, multiprogramming, multiprocessing and multiuser OS.
My question is: Is there any difference between a TASK and a PROCESS. How are PROCESS... (2 Replies)
Discussion started by: hana
2 Replies
2. Shell Programming and Scripting
I have a file contains
TASK gsnmpproxy {
CommandLine = $SMCHOME/bin/gsnmpProxy.exe
}
TASK gsnmpdbgui {
CommandLine = $SMCHOME/bin/gsnmpdbgui.exe
I would like to comment and than uncomment specific task eg TASK gsnmpproxy
Pls suggest how to do in shell script (9 Replies)
Discussion started by: madhusmita
9 Replies
3. Shell Programming and Scripting
I have an ASCII file that I receive on a monthly bases that is fixed length. I break the file into separate files based on a 5 character numerical sequence. I have 20 different sequences I have to find.
the input file looks something like this
xy-ins 2008yuthnrlsinrthsntwilgrha33260001... (4 Replies)
Discussion started by: jcalisi
4 Replies
4. Shell Programming and Scripting
I have an task definition listing xml file that contains a list of tasks such as
<TASKLIST
<TASK definition="Completion date" id="Taskname1" Some other
<CODE name="Code12"
<Parameter pname="Dog" input="5.6" units="feet" etc /Parameter>
<Parameter... (3 Replies)
Discussion started by: MissI
3 Replies
5. UNIX for Advanced & Expert Users
I want to make a script to automate printer adding task.My inputs are like
Printer name : xyz
Port number :9001
I should write a script to make the Printer adding task will be automated.
Like in manually adding task we are doing through hppi or jetadmin tools.
---------- Post updated at... (2 Replies)
Discussion started by: AnilKPatnaik
2 Replies
6. Shell Programming and Scripting
Hi all,
I'm newbie and stuck here. Thanks for any help.
Input(txt file)
a b X
c d Y
e f Z
g h W
Requested output:
a b X Y
c d Y X
e f Z W
g h W Z
Please use code tags when posting data and code samples! (10 Replies)
Discussion started by: hernand
10 Replies
7. Shell Programming and Scripting
Hi experts,
I have a problem with the below shell task:
I need to modify the file creatin a paired row , per each row
which matches filter (e.g. number of nonempty columns = 5)
Output should look like this:
second row is original one from the input,
first row(red) is pairing row, it's... (29 Replies)
Discussion started by: hernand
29 Replies
8. Shell Programming and Scripting
Dear all,
I'm a newbie in programming and I would like to know if it is possible to parallelize the script:
for l in {1..1000}
do
cut -f$l quase2 |tr "\n" "," |sed 's/$/\
/g' |sed '/^$/d' >a_$l.t
done
I tried:
for l in {1..1000}
do
cut -f$l quase2 |tr "\n" "," |sed 's/$/\
/g' |sed... (7 Replies)
Discussion started by: valente
7 Replies
9. Shell Programming and Scripting
Hello everyone my name is Telis and i just registered in this forum.. i just started programming in linux shell and i need help with this easy task..
this is my code
#!/bin/sh
echo "What is your First name?"
read name
if ; then
echo "Hello Master."
else
echo "Who are you?"
fi
when i... (2 Replies)
Discussion started by: Telis
2 Replies
10. Shell Programming and Scripting
Dear All,
I am relatively new to UNIX and wanted to accomplish a simple task which should be automated. That's why I need your help. I shall briefly describe what I want.
Basically, there is a process (X) (related to a particular software which I am using in my system) which automatically... (5 Replies)
Discussion started by: Samiran Dam
5 Replies
LEARN ABOUT DEBIAN
pam_ssh
PAM_SSH(8) BSD System Manager's Manual PAM_SSH(8)
NAME
pam_ssh -- authentication and session management with SSH private keys
DESCRIPTION
The SSH authentication service module for PAM, pam_ssh provides functionality for two PAM categories: authentication and session management.
SSH Authentication Module
The SSH authentication component verifies the identity of a user by prompting the user for a passphrase and verifying that it can decrypt at
least one of the user's SSH login keys using that passphrase.
The following options may be passed to the authentication module:
debug syslog(3) debugging information at LOG_DEBUG level.
use_first_pass If the authentication module is not the first in the stack, and a previous module obtained the user's password, then
that password is used to decrypt the user's SSH login keys. If this fails, then the authentication module returns
failure without prompting the user for a passphrase.
try_first_pass Similar to the use_first_pass option, except that if the previously obtained password fails to decrypt any of the SSH
login keys, then the user is prompted for an SSH passphrase.
try_first_pass has no effect if pam_ssh is the first module on the stack, or if no previous modules obtained the
user's password.
allow_blank_passphrase Allow SSH keys with no passphrase.
If neither use_first_pass nor try_first_pass is specified, pam_ssh will unconditionally ask for an SSH passphrase.
In addition to the above authentication procedure, all standard SSH keys (identity, id_rsa, id_dsa) for which the obtained password matches
will be decrypted.
SSH Session Management Module
The SSH session management component initiates sessions by starting an SSH agent, passing it any SSH login keys it decrypted during the
authentication phase, and sets the environment variables accordingly.
The SSH session management component terminates the session by killing the previously started SSH agent by sending it a SIGTERM.
The following options may be passed to the session management module:
debug syslog(3) debugging information at LOG_DEBUG level.
INFORMATION LEAKS
Be careful with the using the try_first_pass option when pam_ssh is the first authentication module because it will then leak information
about existing users without login keys: such users will not be asked for a specific SSH passphrase, whereas non-existing users and existing
users with login keys will be asked for a passphrase.
FILES
$HOME/.ssh/identity
$HOME/.ssh/id_rsa
$HOME/.ssh/id_dsa OpenSSH DSA/RSA keys decrypted by pam_ssh.
$HOME/.ssh/login-keys.d/ Location of (possibly symbolic links to) OpenSSH DSA/RSA keys used for authentication and decrypted by pam_ssh.
/var/log/auth.log Usual log file for syslog(3)
SEE ALSO
ssh-agent(1), syslog(3), pam.conf(5), pam(8).
AUTHORS
Andrew J. Korty <ajk@iu.edu> wrote pam_ssh. Dag-Erling Smorgrav wrote the original OpenPAM support code. Mark R V Murray wrote the original
version of this manual page. Jens Peter Secher introduced the login-key concept.
BSD
November 26, 2001 BSD