Script to get file from SFTP and run it

view story

http://unix.stackexchange.com – We have 5 servers running our code: A, B , C, D and E. From local machine, we sftp the file to A. Then ssh id@A su - applicationname sftp id@A get bye tar -xzf logout logout The same procedure we apply for others B to E. Is there any way we can simplify this using script ? We have requested linux team to provide passwordless authentication. But we dont know how to do sftp inside a SSH session using script. (HowTos)