Table of Contents

Использование консольного подключения

Подключение к устройствам через консольный интерфейс

FreeBSD/Ubuntu утилита minicom

# apt-get install minicom

# minicom -s

- Serial port setup (/dev/ttyS0 /dev/ttyUSB0 /dev/cuad0 /dev/cuaU0)
- Modem and dialing
- Save setup as dfl
- Exit from minicom

# minicom

Выход: <Ctrl>-a q Выход в меню: <Ctrl>-a z

Настройка консольного интерфейса

line con 0
 exec-timeout 0 0

Дополнительные материалы

Организация консольного сервера

FreeBSD

[server:~] # pkg_add -r conserver-com
 
[server:~] # cat /usr/local/etc/conserver.cf
console switch {
        master localhost;
        rw *;
        type exec;
        exec telnet 192.168.X.3; 
#        type device;
#        device /dev/cuad0;
#        parity none; 
#        baud 9600;
        logfile /var/log/conserverswitch.log;
}
 
console router {
       rw *;
       master localhost;
       type exec;
       exec telnet 192.168.X.1;
       logfile /var/log/conserverrouter.log;
}
 
access * {
        trusted 127.0.0.1;
}
 
[server:~] # /usr/local/etc/rc.d/conserver rcvar
 
[server:~] # console switch
 
<Ctrl>-e c .
 
[server:~] # tail -f /var/log/conserverswitch.log

Ubuntu

root@server:~# apt-get install conserver-client

root@server:~# apt-get install conserver-server

root@server:~# cat /etc/conserver/conserver.cf
config * {
        sslrequired no;
}
console switch {
        rw *;
        master localhost;
        type exec;
        exec telnet 192.168.X.3;
#         type device;
#         device /dev/ttyS0;
#         baud 9600;
#         parity none;
        logfile /var/log/conserver/switch.log;
}

console router {
       rw *;
       master localhost;
       type exec;
       exec telnet 192.168.X.1;
       logfile /var/log/conserver/router.log;
}

access * {
        trusted 127.0.0.1;
}
root@server:~# /etc/init.d/conserver-server restart

root@server:~# console switch

<Ctrl>-e c .

root@server:~# tail -f /var/log/conserver/switch.log 

FreeBSD утилита cu

[hostX:~] # cu -l cuad0 -s 9600

~. - отключиться
~# - послать сигнал break

Передача файлов (xmodem)

FreeBSD

[hostX:~] # pkg_add -r lrzsz

[hostX:~] # cu -l cuad0

switch#copy xmodem: flash:
Destination filename []? test
Begin the Xmodem or Xmodem-1K transfer now...
~CLocal command? lsx .cshrc
Sending .cshrc, 6 blocks: Give your local XMODEM receive command now.
Bytes Sent:    896   BPS:677                             

Transfer complete

896 bytes copied in 13.453 secs (68 bytes/sec)

FreeBSD/Ubuntu утилита minicom

# minicom

switch#copy xmodem: flash:
Destination filename []? test

<Ctrl>-a s xmodem