The executeSSH command is stateless. So every time it is run it goes back to the home directory as if it were a new session.
You can pass both commands on a single line by separating with && e.g.
cd home/{some file path} && ls .
But if run separately the state always goes back to the home directory.
If you want just to list the content of a specific folder, you can pass the folder path as a parameter for the ls command. e.g.
ls /home/{some file path}If you want to keep the state you can use the terminal commands:
terminalSshConnect --name terminal1
--host "x.x.x.x"
--username root
--password "*******"
--port 22
--timeout "00:01:00" connected=value
terminalDetectPrompt --timeout "00:01:00" prompts=value
terminalExecute --command "cd /" result1=value
terminalExecute --command pwd result2=value
terminalExecute --command ls result3=value
terminalDisconnect --name terminal1 disconnected=value
------------------------------
Jadiel Alves Barbosa
------------------------------