• Bare Metal Server

bms
  1. Help Center
  2. Bare Metal Server
  3. Private Image Creation Guide (BMS)
  4. Creating a Linux Image
  5. Configuring Remote Login to a BMS
  6. Oracle Linux 7.3, Oracle Linux 7.4, Red Hat 7, CentOS 7.2, and CentOS 7.4

Oracle Linux 7.3, Oracle Linux 7.4, Red Hat 7, CentOS 7.2, and CentOS 7.4

NOTE:

This section uses the configuration files of CentOS 7.2 as an example. Configuration files of other types of OSs may be different.

  1. Use the vi editor to open the /etc/sysconfig/grub file and add console=tty0 console=ttyS0 after GRUB_CMDLINE_LINUX.
    GRUB_TIMEOUT=5
    GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
    GRUB_DEFAULT=saved
    GRUB_DISABLE_SUBMENU=true
    GRUB_TERMINAL_OUTPUT="console"
    GRUB_CMDLINE_LINUX="crashkernel=auto rhgb quiet console=tty0 console=ttyS0"
    GRUB_DISABLE_RECOVERY="true"
    ~
    ~
  2. Run the following commands to update the configuration:

    stty -F /dev/ttyS0 speed 115200

    grub2-mkconfig -o /boot/grub2/grub.cfg

    systemctl enable getty@ttyS0

  3. To enable user root to log in to the BMS through the serial port, add ttyS0 to the end of the security configuration file /etc/securetty.
    vc/1
    ...
    vc/9
    vc/10
    vc/11
    tty1
    ...
    tty9
    tty10
    tty11
    ttyS0
    "securetty" 39L, 221C