資訊人筆記

Work hard, Have fun, Make history!

使用者工具

網站工具


operating_system:mac_iterm2_console_port

[MacOS] Connect to Console port with iTerm2

0x00 前言

今天實驗室從校計中借了一台 junipor ex2200 switch 打算做 SNMP 的實驗測試

首先第一件事就是必須透過 console port 設定 IP 等配置

本篇記錄透過 iterm2 在 macbook pro 連接 console port 作法

0x01 How To

需求

  • 線材: 通常是一條 RJ45 to RS232 和一條 RS232 to USB
  • usb 232 converter driver: mac 上所需的驅動程式
  • terminal: 本篇使用 iTerm2

Step1.

將 RJ45 端接在 switch 後端 console port 上,另一端接在筆電的 usb port

Step2.

可至 http://plugable.com/drivers/prolific 下載 mac 所需的驅動

安裝完成後在 macbook的 '關於這台mac > 系統報告 > 硬體 > USB' 中應該就能看到 USB-Serial Controller 的驅動了

Step3.

開啟 iTerm2 後應該可以在發現有個 /dev/tty.usbserial

點選 iTerm2 的 'Profiles > Open Profiles > Edit Profiles > + '

產生一個新的 profile,取好名稱

下面 Command 的地方選擇 Command 取代 Login Shell

Command 則輸入

screen /dev/tty.usbserial 115200

tmux 無法直接接一個 device input

之後點選這個 profile 就可以連上 switch 啦

screen /dev/tty.usbserial 跑下去可能會看到畫面什麼都沒有,這時候隨便按下 Enter 他的 login prompt 就會顯示出來啦,這時就能登入了

0x02 參考資料

operating_system/mac_iterm2_console_port.txt · 上一次變更: kshuang