How to prevent PuTTY shell from auto-exit after executing command from batch file in Windows?

前端 未结 2 1227
清歌不尽
清歌不尽 2021-01-04 06:15

I have written a batch file like this:

Start putty.exe -ssh 172.17.0.52 -l root -m dummy.txt

The

2条回答
  •  死守一世寂寞
    2021-01-04 06:45

    As suggested by Martin I tried this step:

    1. putty.exe -ssh 172.17.0.52 -l root -m dummy.txt -t

    2. added /bin/bash at the end of commands in dummy.txt

    It worked for me. Please note, you have to follow both the steps as mentioned above. This way you can keep the session alive and can manually execute further commands.

提交回复
热议问题