SCP shortcut command to known machine
For example you need to deal with different machines, and it takes time to write the IP addresses for each. Can we shorten the writing part?
What you need to do is list the IP addresses with the corressponding name in /etc/hosts file. For example :
Then you can do scp with the known host like:
scp dir/etc/dir/file-site.xml slave1:/home/ubuntu/dir/etc/dir
Hope it helps.