windows下使用putty批处理ssh命令

请问windows下怎样写脚本,可以实现多条ssh命令,
因为SSH要保证在登录的状态下使用,

创建进程,执行一条ssh命令,
putty -ssh -pw $pwd $user@123 $host

因为不能让它弹出窗口,在程序中怎么去执行接下来的命令呢?

SHELLEXECUTEINFO si;
ZeroMemory(&si, sizeof(si));
si.cbSize = sizeof(si);
si.fMask = SEE_MASK_NOCLOSEPROCESS;
si.lpVerb = _T("open");

si.lpFile = strbatpath;
si.nShow = SW_SHOWNORMAL;

ShellExecuteEx(&si);
//m_hInstallProcess = si.hProcess;
WaitForSingleObject(si.hProcess, INFINITE);
CloseHandle(si.hProcess);