Putty for linux serial

Image credit: Material Snowcaps by elite001mm

Launch PuTTY in UART mode on Linux (Ubuntu)

I could not seem to remember the serial configuration string to start PuTTY with the correct baud rate and parity settings, so this is my way of jotting it down for myself and others like me. By default, PuTTY was ultra-tiny on my Linux Mint machine, so I change the font to a more normal 12pt font. I figured most people should have the “Ubuntu Mono” font, but maybe “Monospace Regular” would be better.

putty /dev/ttyUSB0 -serial -sercfg 115200,8,n,1,N -fn "client:Ubuntu Mono 12" -geometry 90x100 -sl 500 

(This command is all one long line.)

For this to work, either you must have root access or your user account has been added to the appropriate group(s) to access serial devices. On Debian/Ubuntu systems, this is normally the dialout group. To add yourself to dialout , run:

You must log out of your account, then log back in for the new group permissions to take effect.

Let’s break the PuTTY command (above) down.

  • putty name of the command
  • /dev/ttyUSB0 serial device, in my case a USB to UART adapter which was enumerated by my machine as USB0
  • -serial use serial mode, not SSH or telnet modes
  • -sercfg the serial configuration string (explained below)
  • -fn specify the font (both typeface and pt size) of the PuTTY terminal
  • -geometry specify the size (in number of character rows and columns) of the PuTTY terminal
  • -sl number of scrollback lines PuTTY will remember
Читайте также:  Linux wine com порт

The sercfg string has the following meaning. The settings I’ve chosen should be the default for some common devices, like a Raspberry Pi 3, however 9600 baud is also very common.

Setting Name Value
Baud rate 115200
Data bits 8
Parity none
Stop bits 1
Flow control none

For more detailed information about launching PuTTY from the command line or any other PuTTY operation, check out the PuTTY documentation, available here:

© 2021 Alexander Hogen · Powered by the Academic theme for Hugo.

Источник

How can I access putty from linux terminal?

I’m trying to configure my cisco 2950 switch and I need to use putty on linux. Im not used to using linux but I’ve been told that putty is built in to linux terminal. I have my serial console cable connected to the router but I’m unable to telnet in. How do I use putty?

2 Answers 2

The PuTTY program is not built into Linux. What the other person meant is that most Linux systems come with commands that provide the same functionality as PuTTY:

  • The SSH client is ssh .
  • The Telnet client is telnet .
  • The serial console clients are screen and minicom .

To connect to the first serial port using screen, run:

Press Ctrl A followed by Ctrl K to disconnect. (Some systems use just K instead of Ctrl K .)

@Kruug: That’s not always desirable when using screen as a serial console terminal, since it leaves the tty device busy and can cause confusion.

Putty does exist on Linux too ( sudo apt-get install putty on most debian-ish systems), if Putty is exactly what you have a guide for — even though it’s unnecessary on Linux.

Читайте также:  Dithering controls nvidia linux

To find the serial port to use for Putty/Minicom/Screen, you could plug in the cable and shortly after use dmesg | grep USB in a terminal to see the output (you should see something like New device on /dev/ttyUSB0 or various /dev/tty* ‘s to make sure you are attempting to connect to the correct Serial line.

As an alternative if Linux overwhelms you:

If all you need is access to the Serial connection and nothing specific from the Linux shell, then you can use Putty from Windows (I would assume you have access to a Windows machine as well). (Download Page).

Determine which Serial port (or «COM» port in windows) you need in Device Manager:

COM ports

Then in Putty, choose Serial , enter the COM port and the BAUD (Speed):

enter image description here

If you need advanced settings to the serial connection in PUTTY, you can do that in the left menu Connection > Serial

Источник

Использование PuTTY

PuTTY — это бесплатный Telnet и SSH-клиент с помощью которого можно подключаться к контроллеру по SSH или через Debug-консоль, а также настраивать serial-устройства по протоколу Telnet.

Перед использованием PuTTY, программу нужно установить:

  • Для ОС Windows — загрузите и установите дистрибутив с официального сайта программы.
  • Для Debian-подобной ОС Linux — выполните в консоли команды:
sudo apt update sudo apt install putty

Подключение по SSH

Значение логина и пароля по умолчанию смотрите в статье SSH. . Для примера рассмотрим подключение по SSH к контроллеру Wiren Board:

  1. Запустите PuTTY.
  2. Выберите слева в поле Category ветку Session.
  3. Ведите IP-адрес контроллера. Как узнать IP-адрес контроллера
  4. Укажите номер порта — 22.
  5. Переключатель Connection type установите в положение SSH.
  6. Нажмите кнопку Open.
  7. При первом подключении к контроллеру появится окно запроса на приём от него ключа шифрования соединение — нажмите Accept.
  8. При успешном подключении откроется окно терминала с предложением ввести логин:
    • login as: введите логин и нажмите клавишу Enter .
    • password: введите пароль пользователя. Введённые символы не отображаются, после окончания ввода нажмите клавишу Enter .
  9. Если логин и пароль введены верно — в консоли появится приветственное сообщение и приглашение на ввод команды.

Источник

Оцените статью
Adblock
detector