1

I want to run .bat file with certain parameters to open SSH connection to RouterBoard and then do some commands in MikroTik RouterOS.

It look like this right now:

<b>*C:\\Users\user\Desktop\ssh.bat admin 192.168.1.1 password*</b>    

ssh %1@%2
timeout /t 3
%3
timeout /t 5
system routerboard upgrade
timeout /t 1
y
timeout /t 1
system reboot
timeout /t 1
y

%1 is variable for username, which will be automaticcaly added when running from external program (The Dude) %2 is for IP address %3 is for password

My PROBLEM IS that CMD, after SSH connection is estabilished, prompts me for password which I dont wont to fill in manually. I cant get it working.

Is there ANY way to make that .bat fill in and enter the password automatically based on that third parameter, which is specified when running that batch file?

Thank you very much, Iam trying hard...

0 Answers0