Reputation: 21
I am very new to scripting and have pretty less ideas on the options available and the usage. My requirement is, I need to run a shell script from a jum host. The script should copy a file from local to remote linux host, untar it and run a execute command. These three operations should happen on the remote machine but script will be run from the jump host.
I will pass destination machine IP and password and the file as the arguments.
I have tried to do this. But not able to succeed. Please some body help me out how i can accomplish this.
Upvotes: 2
Views: 574
Reputation: 2614
You cannot pass your password through the command line for these tools. Use private/public keys for password-less login. There are lots of examples on the internet on how to do this:
http://linuxproblem.org/art_9.html
Upvotes: 3