I am using shell script to add some file to server. Is there any way to write a shell script that will execute one part on local computer and the other part when you're logged into that server?
For example, I want to log in, do something, add some file, and then I want to list everything on that server.
ssh something@something
I enter password
Then list files from server.
ssh user@host ls /remote/dir/on/hostCouple that with an SSH key, and the action is basically seamless as though you executed it locally.