Created
August 1, 2014 13:03
-
-
Save pgbytes/b2c0e85f21e04649dd2c to your computer and use it in GitHub Desktop.
SCP Commands #linux_commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Copy Jars to remote locations | |
#!/bin/bash | |
nodes="192.168.2.70 192.168.2.71 192.168.2.72 192.168.2.73 192.168.2.74 192.168.2.75" | |
for node in $nodes | |
do | |
echo deploy node: $node | |
ssh -o StrictHostKeyChecking=no user@$node 'mkdir /home/user/vrnet &' | |
scp target/com.innoplexia.vrnet.integrationserver-1.0.0-BUILD-SNAPSHOT.jar | |
user@$node:/home/user/vrnet/ | |
done | |
Copy config files to remote locations | |
#!/bin/bash | |
nodes="192.168.2.70 192.168.2.71 192.168.2.72 192.168.2.73 192.168.2.74 192.168.2.75" | |
index=1 | |
for node in $nodes | |
do | |
echo copy node: $node | |
scp appConfigFiles/appConfigFinal$index.xml user@$node:/home/user/vrnet/config.xml | |
let "index++" | |
done | |
Copy folder to remote location | |
#!/bin/bash | |
nodes="192.168.2.70 192.168.2.71 192.168.2.72 192.168.2.73 192.168.2.74 192.168.2.75" | |
index=1 | |
for node in $nodes | |
do | |
echo copy node: $node | |
scp -r firefoxProfile user@$node:/home/user/vrnet/ | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment