• openbsd telnet to serial

    From bbsing@VERT/LUNAROUT to All on Monday, November 24, 2025 21:36:11
    I've been trying to understand why when I telnet to my openbsd to a modem hooked to the serial port, the password is echoed at the login prompt.

    This happens from any linux client I've used to telnet to the openbsd system over the serial port.

    Same behavior happens with a linux system.

    My setup is really simple.
    modem is set to auto answer ats0=1

    /etc/boot.conf has the following:
    set tty com0

    /etc/ttys has the following:
    console "/usr/libexec/getty std.9600" vt220 on secure

    ----------------------------------------------------------

    Does anyone know why the password is shown, and how to get it to not echo when the user types it in?

    ---
    þ Synchronet þ Lunar Outpost BBS
  • From phigan@VERT/TACOPRON to bbsing on Wednesday, November 26, 2025 05:43:54
    Re: openbsd telnet to serial
    By: bbsing to All on Mon Nov 24 2025 09:36 pm

    Does anyone know why the password is shown, and how to get it to not echo wh the user types it in?

    Have you tried using a raw connection into it instead of telnet? Try this for science.. make sure you have netcat (nc) installed. Create a file called raw.sh with this in it:

    settings=$(stty -g)
    stty raw -echo
    nc $1 $2
    stty $settings

    then 'chmod +x raw.sh' and then './raw.sh ipaddress port'. Just one thing to note, when you finally disconnect, you need to hit a key to return to your prompt.

    The reason for this is telnet does some negotiation on connect, and you're not running telnetd. Your client says "Hey, let's agree on some stuff!" but your server isn't listening for that.

    ---
    þ Synchronet þ TIRED of waiting 2 hours for a taco? GO TO TACOPRONTO.bbs.io
  • From bbsing@VERT/LUNAROUT to phigan on Thursday, November 27, 2025 18:01:12
    Re: openbsd telnet to serial
    By: phigan to bbsing on Wed Nov 26 2025 05:43:54

    Re: openbsd telnet to serial
    By: bbsing to All on Mon Nov 24 2025 09:36 pm

    Does anyone know why the password is shown, and how to get it to not echo wh the user types it in?

    Have you tried using a raw connection into it instead of telnet? Try this for science.. make sure you have netcat (nc)
    installed.
    Create a file called raw.sh with this in it:

    settings=$(stty -g)
    stty raw -echo
    nc $1 $2
    stty $settings

    then 'chmod +x raw.sh' and then './raw.sh ipaddress port'. Just one thing to note, when you finally disconnect, you need to hit
    a
    key to return to your prompt.

    The reason for this is telnet does some negotiation on connect, and you're not running telnetd. Your client says "Hey, let's
    agree
    on some stuff!" but your server isn't listening for that.


    OK this was interesting. The password did not appear when I typed it. The username did, but not the password. I don't udnerstand why when I hook the serial port of my modem up directly to getty and its identified as a dialin device it does this.

    netcat worked how I wanted it to.

    Why does the behavior change using telnet vs netcat's raw connection.

    NOTE: I switch from openbsd to freebsd because there is no inetd server, or telnetd server with openbsd.


    FreeBSD/amd64 (dad) (ttyu0)

    login: CONNECT

    Password:
    Login incorrect
    login: bbsing
    Password:
    Last login: Wed Nov 26 17:32:27 on ttyu0
    FreeBSD 14.3-RELEASE-p5 GENERIC


    :) :)

    ---
    þ Synchronet þ Lunar Outpost BBS
  • From bbsing@VERT/LUNAROUT to phigan on Thursday, November 27, 2025 20:15:03
    Re: openbsd telnet to serial
    By: bbsing to phigan on Thu Nov 27 2025 18:01:12

    Re: openbsd telnet to serial
    By: phigan to bbsing on Wed Nov 26 2025 05:43:54

    Re: openbsd telnet to serial
    Have you tried using a raw connection into it instead of telnet? Try this for science.. make sure you have netcat (nc)
    installed.
    Create a file called raw.sh with this in it:

    settings=$(stty -g)
    stty raw -echo
    nc $1 $2
    stty $settings

    then 'chmod +x raw.sh' and then './raw.sh ipaddress port'. Just one thing to note, when you finally disconnect, you need to
    hit
    a
    key to return to your prompt.

    The reason for this is telnet does some negotiation on connect, and you're not running telnetd. Your client says "Hey, let's
    agree
    on some stuff!" but your server isn't listening for that.



    So somehow I have to get my modem to use telnetd as the program instead of going to getty, then when a client telnet's to my system the password will not appear when the client types it.

    freebsd handbook doesn't mention this behavior about ttys and dialin specifier, or just a std.9600 specifier.

    A new adventure.

    ---
    þ Synchronet þ Lunar Outpost BBS
  • From phigan@VERT/TACOPRON to bbsing on Friday, November 28, 2025 00:59:29
    Re: openbsd telnet to serial
    By: bbsing to phigan on Thu Nov 27 2025 08:15 pm

    So somehow I have to get my modem to use telnetd as the program instead of going to getty, then when a client telnet's to my system the password will n

    Exactly. That's what I was trying to say in the earlier message. When you use a telnet client connecting into getty, the client can't do its expected negotiation. Same if you do the opposite, connect raw into a telnetd.

    ---
    þ Synchronet þ TIRED of waiting 2 hours for a taco? GO TO TACOPRONTO.bbs.io