Skip to content

Instantly share code, notes, and snippets.

@pgbytes
Created August 1, 2014 13:03
Show Gist options
  • Save pgbytes/b2c0e85f21e04649dd2c to your computer and use it in GitHub Desktop.
Save pgbytes/b2c0e85f21e04649dd2c to your computer and use it in GitHub Desktop.
SCP Commands #linux_commands
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