Blokovani pres konstantu
[mirrors/Programs.git] / bash / clusterssh-scan.sh
CommitLineData
b559f300
H
1#!/bin/bash
2
3scan_for_ssh() {
4 for i in $( seq 158 255 ); do
5 # echo 1 "$1"."$i" 22;
6 nc -z -w 1 "$1"."$i" 22;
7 if [ "$?" = 0 ]; then
8 echo -n "$1.$i ";
9 fi;
10 done;
11 echo;
12}
13
14get_ssh_logins() {
15 for i in $( scan_for_ssh "$2" ); do
16 echo -n "$1"@"$i ";
17 done;
18 echo;
19}
20
21get_ip_range() {
22 for i in $( seq 158 255 ); do
23 echo -n "$1.$i ";
24 done;
25 echo;
26}
27
28#cssh $( get_ssh_logins root 192.168.2 )
29
30cssh -T "Klub SSPS" root@192.168.2.161
This page took 0.218157 seconds and 4 git commands to generate.