We have 5 servers running our code: A, B , C, D and E.
From a local machine, we sftp the file to A. Then
ssh id@A
su - applicationname
sftp id@A
get <file>
bye
tar -xzf <file>
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 don't know how to do sftp inside a SSH session using a script.