Jump to content

Connect to Mikrotik Router


Recommended Posts

  • 2 years later...

hi...

i connected... start

$user = "root"
$password ="xxxxxxxx"
$host ="5.0.0.1"
$port ="22"

$puty_exe = @ScriptDir & "\putty.exe"; putty salve local folder script

; putty -ssh -l usuario 5.0.0.1 p "port" -pw senha

;input

$command = RunWait(@comspec & " /C "&$puty_exe&" -ssh -l "&$user&" "&$host&" p "&$port&" -pw "&$password,@SystemDir, @SW_HIDE, 1)

While 1
$data = StdoutRead($command)
ConsoleWrite($data&@CRLF)
If @error Then ExitLoop
Wend
Edited by bhns

:bike: 

Att...Cleber Antônio Made in Bio zonte Minas Gerais  :sweating:

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...