Правильное решение состоит в том, чтобы использовать ntlm_auth программу от более свежего распределения самбы: самба 3.4 и самба 3.5, кажется, аутентифицируют Win7 с NTLMv2 без проблем. Samba 3.0 не мог сделать это.
use plink (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html), you also can use putty to execute the ssh command but you can't get the output.
C:\>plink.exe -ssh root@1.1.1.1 -pw mypassword uptime
06:40:58 up 50 days, 3:30, 8 users, load average: 0.00, 0.07, 0.10
C:\>plink.exe -ssh root@1.1.1.1 -pw mypassword uptime > output.txt
C:\>type output.txt
06:41:45 up 50 days, 3:31, 8 users, load average: 0.00, 0.06, 0.09
execute script
C:\>type cmd.txt
uptime
C:\>plink.exe -ssh root@1.1.1.1 -pw mypassword -m cmd.txt
06:41:45 up 50 days, 3:31, 8 users, load average: 0.00, 0.06, 0.09