Follow us on...
Follow us on G+ Follow us on Twitter Follow us on Facebook Watch us on YouTube
Register
Results 1 to 3 of 3
  1. #1
    Status
    Offline
    Ikhwan Wiiper's Avatar
    Baru Gabung
    Join Date
    Dec 2011
    Location
    Pekalongan, Indonesia, Indonesia
    Posts
    7
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0

    Scripting Auto Reboot UBNT

    Terimakasih sebelume jika bisa membantu gan
    jadi saya ingin mencoba membuat scripting buat schedule gan di mikrotik, biar setiap 1 hari sekali AP UBNT saya reboot otomatis pada jam tertentu sesuai schedule di mikrotik

    /system ssh address=192.168.1.20 user=ubnt command=reboot
    password=ubnt

    lah kendalanya kalo remot pake SSH atau Telnet dari mikrotik kan harus isi password, gmn caranya biar dijadikan scripting otomatis gan,

  2. #2
    Status
    Offline
    yosanpro's Avatar
    Co-Admin
    Join Date
    Nov 2007
    Location
    Bantul, Bantul, Yogyakarta
    Posts
    2,562
    Reviews
    Read 0 Reviews
    Downloads
    11
    Uploads
    4
    Feedback Score
    1 (100%)
    Click here to enlarge Originally Posted by Ikhwan Wiiper Click here to enlarge
    Terimakasih sebelume jika bisa membantu gan
    jadi saya ingin mencoba membuat scripting buat schedule gan di mikrotik, biar setiap 1 hari sekali AP UBNT saya reboot otomatis pada jam tertentu sesuai schedule di mikrotik

    /system ssh address=192.168.1.20 user=ubnt command=reboot
    password=ubnt

    lah kendalanya kalo remot pake SSH atau Telnet dari mikrotik kan harus isi password, gmn caranya biar dijadikan scripting otomatis gan,
    Bisa dibikin login pake authorized key.
    caranya gini:

    - Generate dsa keys pair, atau kalau saya biasa cuman langsung export keys yang ada.
    Code:
    /ip ssh export-host-key key-file-prefix=key
    Nanti akan muncul 4 file baru di menu files winbox.

    - Copy file yang di generate ke komputer, cukup file key_dsa.pub saja bisa.

    - Jalankan perintah ini untuk menggunakan certificate tadi untuk login ssh
    Code:
    /user ssh-keys private import private-key-file=key_dsa public-key-file=key_dsa.pub passphrase=""
    - Masuk ke ubnt, Services, klik Edit di Authorized keys, klik browse, pilih file yang tadi dicopy ke PC, klik import.


    Dengan metode di atas harusnya perintah ssh di mikrotik tidak lagi perlu password.
    A person's junk is another person's treasure.

  3. #3
    Status
    Offline
    yosanpro's Avatar
    Co-Admin
    Join Date
    Nov 2007
    Location
    Bantul, Bantul, Yogyakarta
    Posts
    2,562
    Reviews
    Read 0 Reviews
    Downloads
    11
    Uploads
    4
    Feedback Score
    1 (100%)
    Sayangnya setelah mencoba sendiri dan lihat2 forum luar, ternyata perintah ssh tidak bisa dibikin otomatis. Cara diatas jalan normal di terminal, tetapi begitu masuk script atau scheduler, perintah external macam ssh tidak dijalankan oleh mikrotik.
    A person's junk is another person's treasure.

 

 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. <ASK> Membuat System Script Otomatis Reboot UBNT
    By Ikhwan Wiiper in forum Tutorial
    Replies: 0
    Last Post: 26-10-2015, 21:30
  2. [ASK] auto reboot daily tidak berjalan
    By yossyeri3010 in forum Scripting @ Mikrotik
    Replies: 1
    Last Post: 08-06-2015, 23:32
  3. [ASK] resolve hostname auto scripting
    By budiman in forum Scripting @ Mikrotik
    Replies: 2
    Last Post: 26-05-2015, 22:04
  4. [Info] Auto Reboot & Clear Counter Mikrotik
    By okto_2005 in forum Scripting @ Mikrotik
    Replies: 45
    Last Post: 23-07-2014, 15:38
  5. Replies: 12
    Last Post: 11-04-2008, 08:28

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •