How to write a bash script, that logs onto an other machine to do stuff?

view full story

http://unix.stackexchange.com – Is it possible to write a bash script, that would be started from machine A, logs in on a different machine B by ssh (both machines A and B would be Linux-Machines), copys some files on to machine B runs a python script a given python script on these machines. transfers the results back to machine A logs off from machine B. Is this technically doable? (HowTos)