I'm triyng to make a bat file to ssh connect to a computer and run a command. However, this command is to open an UI, and it seems that, when Im running my bat script, the connection is closed after the execution. What is the best way to do this?
The commands I run mannualy for this to work:
ssh -XY user@hostname (digit my password) micromamba activate env open-ui.py I tried putting this on my bat file:
@echo off ssh -XYt user@hostname "micromamba activate env && open-ui.py" But it seems to close the terminal right after running the commands.
@echo off ssh -XYt user@hostname "micromamba activate env && open-ui.py" pause This seems to close the ssh connection before pausing, and
@echo off ssh -XYt user@hostname micromamba activate env open-ui.py pause This opens the ssh connection and then it does nothing else.
I dont mind typing my password mannualy. Can someone help?
open-ui.pydo? Could you edit your question to include the script or the important parts of it? does it run another command in the background?ssh -XYt user@hostname "micromamba activate env && open-ui.py && read"to stop ssh from closing the connection, this assumes thathostnameis a linux server, for a windows host usepauseinstead ofread