submit cmd file

I've this cmd file (see attach file) that run on O.S. Linux RedHat 5.4 (2.6.18-308.1.1.el5)

I'd like to modify this cmd to start and stop some components of Oracle Access Manager
The command to start/stop are in rem command (example rem set COMMAND=. ~/.profile ; ls -l)

To start/stop the access server I must (user=omx IP=
then wait 2 minutes
and Submit START_AS.CMD

set COMMAND=. ~/.profile ; stop_access_server

To start/stop the identity server I must (user=odx IP=
then wait 2 minutes
and Submit START_IS.CMD

How can I modify this file and How can I write the command to wait 2 minutes between stop and start?
Who is Participating?
Ernie BeekConnect With a Mentor ExpertCommented:
Ok, I think I got it.

In the KIX script an SSH tunnel connection is set up to a remote device ( and linked to port 2222 at your localhost ( After that, the commands defined in set COMMAND are run through an SSH connection at port 2222.

My guess would be that if you see the Continuare? prompt, that tunnel is still open and you should be able to connect using putty to port 2222 (instead of IP and port 22).
Ernie BeekExpertCommented:
You could use the 'sleep' command.
Ernie BeekExpertCommented:
Or, if it's unknow, download the resource tool kit:
It's in there.
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

ralph_reaAuthor Commented:

if I start cmd file it run correctly open the Console - Quest Plink that display:
Starting tunnel...Using username "tunnel".
Waiting for tunnel...
Tunnel established !
Cleaning registry key
and then Authentication Required - Quest PuTTY for response the password.

Now I'd Like to connect to Linux shell via PuTTY. I run PuTTY.exe and in Hostname I put Port: 22 SSH connection type but I can't get the login prompt.

What I wrong?
Ernie BeekExpertCommented:
So you're setting up a (VPN) tunnel to a remote system using that console and within the console it's then asking for the password? It looks to me that you are allready connecting to the shell within that console or am I mistaking?
It's not quite clear to me what you're trying to do exactely.
ralph_reaAuthor Commented:
In attach (start.doc) the steps I get when I start file Start-exchange.cmd.

Ernie BeekExpertCommented:
I see that in start-exchange.cmd you start a console that runs KIX32:

start Apps\Console\Console.exe -d . -r "cmd /c Apps\Kix\KIX32.exe Custom\SSH.kix $PONTE=%PONTE% $SSHIP=%IP% $SSHUSER=%USER% $SSHCOMMAND=\"%COMMAND%\""

What's in the SSH.kix?
ralph_reaAuthor Commented:
if from dos I run:

start Apps\Console\Console.exe -d . -r "cmd /c Apps\Kix\KIX32.exe Custom\SSH.kix"

I get display in ssh_kix.doc file attached
ralph_reaAuthor Commented: attach file ssh.kix
Ernie BeekExpertCommented:
That's not quite what I meant ;)

I would like to know what is in the SSH.kix file. It's a text file so you can open it with notepad or similar.
Ernie BeekExpertCommented:
Ah, thx.
Paul TomasiCommented:
The following command will pause a batch file for 2 minutes:

    ping -n 120 -w 1000 >nul
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.