Am 23.10.2011 14:10, schrieb suvayu ali: > I know about ~/.ssh/config and I use it. Logging in to the remote nodes > is not the issue in my case. I use kerberos to authenticate anyway. The > issue is when I want to access my machine from those remote nodes, I > have to copy the section relevant to my machine to the remote nodes. if you have to maintain many hosts you should invest an hour for a infrastructure and after that it does not matter if you have 10, 100 or thousands of hosts where you need the same file distributed sorry, but you can tell me what you want - there is no single problem maintaining thousands of machines with ssh on non-stadnard-port and if the ISP of the OP is blocking incoming port 22 he has no other solution - so what baout are we speaking here? your "nc" will not work for him and your problem maintaining multiple machines does not affect the whole world because most does not have so many hosts and the others are knowing about shell-scripts _______________________________ [root@buildserver:~]$ cat /Volumes/dune/buildserver/server-list.txt #!/bin/bash RH_TARGET_SERVERS=() RH_TARGET_SERVERS[1]="host1" RH_TARGET_SERVERS[2]="host2" RH_TARGET_SERVERS[3]="host3" RH_TARGET_SERVERS[4]="host4" RH_TARGET_SERVERS[5]="host5" RH_TARGET_SERVERS[6]="host6" [root@buildserver:~]$ cat /Volumes/dune/buildserver/distribute-file.sh #!/bin/bash source /Volumes/dune/buildserver/server-list.txt function rh_push_file { echo $1 RSYNC_PARAMS='--ipv4 --compress --times --progress --force --links --perms --owner --group' /bin/nice /usr/bin/rsync $RSYNC_PARAMS --rsync-path='nice -n 19 rsync' "$2" "root@$1:$2" echo "" } if [ "$2" == "" ] then echo "" > /dev/null else echo "Bitte Parameter in Quotes setzen" exit fi for item in ${RH_TARGET_SERVERS[*]} do rh_push_file $item "$1" done [root@buildserver:~]$ cat /Volumes/dune/buildserver/distribute-command.sh #!/bin/bash source /Volumes/dune/buildserver/server-list.txt function rh_run_command { echo $1 ssh root@$1 "$2" echo "" } if [ "$2" == "" ] then echo "" > /dev/null else echo "Bitte Parameter in Quotes setzen" exit fi echo "" for item in ${RH_TARGET_SERVERS[*]} do rh_run_command $item "$1" done
Attachment:
signature.asc
Description: OpenPGP digital signature
-- users mailing list users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines