Screen Shot 2016-04-30 at 3.18.55 PM

I wanted the full immersion of configuring a router in Cisco VIRL, so I redirected telnet & SSH queries to Terminal.app.

Procedure

  1. Open VMMaestro and open Preferences…
  2. Expand Terminal > Cisco Terminal via the left pane.
  3. Check the Use external terminal applications radio box
  4. Fill in the following:
    • Telnet command: /usr/bin/osascript
    • Telnet arguments: /Users/%userDirectory%/VIRLTerminalCall.scpt telnet %h %p %t
    • SSH command: /usr/bin/osascript
    • SSH arguments: /Users/%userDirectory%/VIRLTerminalCall.scpt ssh -Atp%p guest@%h %r %t
  5. Click Apply and OK
  6. Open Applescript Editor
  7. Copy and paste the following into a blank script:
    on run argv
        tell application "Terminal"
            activate
            -- open a new Tab, sadly, there is no method
            tell application "System Events"
                keystroke "t" using {command down}
            end tell
            repeat with win in windows
                try
                    if get frontmost of win is true then
                        set cmd to "/usr/bin/" & item 1 of argv & " " & item 2 of argv & " " & item 3 of argv
                        do script cmd in (selected tab of win)
                        set custom title of (selected tab of win) to item 4 of argv
                    end if
                end try
            end repeat
        end tell
    end run
  8. File > Save As…
    Name: VIRLTerminalCall.scpt
    Directory: /Users/%userDirectory%

That’s it. Open VMMaestro, run a simulation, and Telnet/SSH into your node. Happy configuring.