Sponsored Content
Operating Systems Solaris Check SSH Connection .. help .. Post 302260462 by prash184u on Thursday 20th of November 2008 02:38:49 PM
Old 11-20-2008
WOW ... for loop worked

thank you so much chatwizrd

don't know why while loop did not work .. but it will do the job ... thanks again
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

ssh connection

pls how do i connect to my freebsd server via ssh from a windows client?? I have sshd running on d freebsd server. (9 Replies)
Discussion started by: lealyz
9 Replies

2. UNIX for Dummies Questions & Answers

ssh connection

Hi @ all! I've a problem with a ssh-connection. I want to establish a ssh-connection between an AIX-System and an SunOS-System without a password. The Users are different one's. Command : user1@server1 /home/user1 > ssh user2@server2 Is it possible? Greetings olli-h (1 Reply)
Discussion started by: olli-h
1 Replies

3. Shell Programming and Scripting

check ssh connection to remote host

I am using KSH and I need to check whether the remote host has been configured with ssh public key. Is there any way we can check inside a script? (6 Replies)
Discussion started by: praveenbvarrier
6 Replies

4. Red Hat

Ssh connection

hi, I have ssh connection between two servers for a functional Id for SFTP purpose. I aim is to setup this for is only work when below command is used by a .ksh script. ssh userid@servername:/directory Unfortunately users who have access to functional id are manually using above command... (2 Replies)
Discussion started by: maddy26615
2 Replies

5. UNIX for Advanced & Expert Users

How keep running a program n an another computer via a connection ssh when the connection is closed?

Hi everybody, I am running a program on a supercomputer via my personal computer through a ssh connection. My program take more than a day to run, so when I left work with my PC I stop the connection with the supercomputer and the program stop. I am wondering if someone know how I can manage... (2 Replies)
Discussion started by: TomTomGre
2 Replies

6. Shell Programming and Scripting

Check if file exists via ssh in ssh (nested)

I'm using redhat and have an odd issue with a nested ssh call. ssh -i ~/.ssh/transfer-key -q transfer@fserver1 ] && ssh -i ~/.ssh/transfer-key transfer@fserver1 "ssh -i ~/.ssh/sftp-key sftpin@10.0.0.1 ]" && ssh -i ~/.ssh/transfer-key transfer@fserver1 "scp -i ~/.ssh/sftp-key /home/S/outbox/*... (2 Replies)
Discussion started by: say170
2 Replies

7. UNIX for Advanced & Expert Users

Connection-less using ssh

Hi! I know its a recurring problem, but I am failing to sort this out, I have two servers ( A and B), in which I am able to connect without having to put password from server B to server A, but the connect from server A to server B. takes 7 minutes to establish??? on Server A, I have the... (7 Replies)
Discussion started by: fretagi
7 Replies

8. BSD

Connection SSH to remote by ssh

Hello guys! I am setting up a script to access a unix remote server. My problem is that when I put the ssh line "my host", the script does not wait for the server response asking for the password to execute the line in which I put the password, that is, I need to put a form in which script has a... (1 Reply)
Discussion started by: aroucasp
1 Replies

9. UNIX for Beginners Questions & Answers

Ssh script to validate ssh connection to multiple serves with status

Hi, I want to validate ssh connection one after one for multiple servers..... password less keys already setup but now i want to validate if ssh is working fine or not... I have .sh script like below and i have servers.txt contains all the list of servers #/bin/bash for host in $(cat... (3 Replies)
Discussion started by: sreeram4
3 Replies
pssh(1) 						      General Commands Manual							   pssh(1)

NAME
pssh -- parallel ssh program SYNOPSIS
pssh [-vAiIP] [-h hosts_file] [-H [user@]host[:port]] [-l user] [-p par] [-o outdir] [-e errdir] [-t timeout] [-O options] [-x args] [-X arg] command ... pssh -I [-vAiIP] [-h hosts_file] [-H [user@]host[:port]] [-l user] [-p par] [-o outdir] [-e errdir] [-t timeout] [-O options] [-x args] [-X arg] [command ...] DESCRIPTION
pssh is a program for executing ssh in parallel on a number of hosts. It provides features such as sending input to all of the processes, passing a password to ssh, saving output to files, and timing out. OPTIONS
-h host_file --hosts host_file Read hosts from the given host_file. Lines in the host file are of the form [user@]host[:port] and can include blank lines and com- ments (lines beginning with "#"). If multiple host files are given (the -h option is used more than once), then pssh behaves as though these files were concatenated together. If a host is specified specified multiple times, then pssh will connect the given number of times. -H [user@]host[:port] --host [user@]host[:port] -H "[user@]host[:port] [ [user@]host[:port ] ... ]" --host "[user@]host[:port] [ [user@]host[:port ] ... ]" Add the given host strings to the list of hosts. This option may be given multiple times, and may be used in conjunction with the -h option. -l user --user user Use the given username as the default for any host entries that don't specifically specify a user. -p parallelism --par parallelism Use the given number as the maximum number of concurrent connections. -t timeout --timeout timeout Make connections time out after the given number of seconds. With a value of 0, pssh will not timeout any connections. -o outdir --outdir outdir Save standard output to files in the given directory. Filenames are of the form [user@]host[:port][.num] where the user and port are only included for hosts that explicitly specify them. The number is a counter that is incremented each time for hosts that are specified more than once. -e errdir --errdir errdir Save standard error to files in the given directory. Filenames are of the same form as with the -o option. -x args --extra-args args Passes a extra SSH command-line arguments (see the ssh(1) man page for more information about SSH arguments). This option may be specified multiple times. The arguments are processed to split on whitespace, protect text within quotes, and escape with back- slashes. To pass arguments without such processing, use the -X option instead. -X arg --extra-arg arg Passes a single SSH command-line argument (see the ssh(1) man page for more information about SSH arguments). Unlike the -x option, no processing is performed on the argument, including word splitting. To pass multiple command-line arguments, use the option once for each argument. -O options --options options SSH options in the format used in the SSH configuration file (see the ssh_config(5) man page for more information). This option may be specified multiple times. -A --askpass Prompt for a password and pass it to ssh. The password may be used for either to unlock a key or for password authentication. The password is transferred in a fairly secure manner (e.g., it will not show up in argument lists). However, be aware that a root user on your system could potentially intercept the password. -i --inline Display standard output and standard error as each host completes. -v --verbose Include error messages from ssh with the -i and options. -I --send-input Read input and send to each ssh process. Since ssh allows a command script to be sent on standard input, the -I option may be used in lieu of the command argument. -P --print Display output as it arrives. This option is of limited usefulness because output from different hosts are interleaved. EXAMPLE
Connect to host1 and host2, and print "hello, world" from each: pssh -i -H "host1 host2" echo "hello, world" Print "hello, world" from each host specified in the file hosts.txt: pssh -i -h hosts.txt echo "hello, world" Run a command as root with a prompt for the root password: pssh -i -h hosts.txt -A -l root echo hi Run a long command without timing out: pssh -i -h hosts.txt -t 0 sleep 10000 If the file hosts.txt has a large number of entries, say 100, then the parallelism option may also be set to 100 to ensure that the com- mands are run concurrently: pssh -i -h hosts.txt -p 100 -t 0 sleep 10000 Run a command without checking or saving host keys: pssh -i -H host1 -H host2 -x "-O StrictHostKeyChecking=no -O UserKnownHostsFile=/dev/null -O GlobalKnownHostsFile=/dev/null" echo hi EXIT STATUS VALUES
0 Success 1 Miscellaneous error 2 Syntax or usage error 3 At least one process was killed by a signal or timed out. 4 All processes completed, but at least one ssh process reported an error (exit status 255). 5 There were no ssh errors, but at least one remote command had a non-zero exit status. AUTHORS
Written by Brent N. Chun <bnc@theether.org> and Andrew McNabb <amcnabb@mcnabbs.org>. http://code.google.com/p/parallel-ssh/ SEE ALSO
ssh(1), pscp(1), prsync(1), pslurp(1), pnuke(1) February 25, 2010 pssh(1)
All times are GMT -4. The time now is 09:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy