I am interested if there is any way to change current working directory on remote server by using subprocess or pxssh modules. The purpose for this is to make new directories, and copy/paste files. Also, it would be useful for me to know if there is any way to do these things in one single process. Executing command below does not help me because process terminates immediately after command execution is completed.
import subprocess
p=subprocess.Popen(['ssh', '15.27.23.2','cd /home/incoming'], shell=True)
p.wait()
Does anyone know way to do this? No third part libraries should be used. Thanks for any help.