Disable telnet autologin in 10.2

Aug 29, '02 06:12:23AM

Contributed by: bit_bucket

Those of you that do unix server admin work will realize that Jaguar (10.2) integrates a new telnet feature that many BSD user's have complained about, which is autologin. This can be disabled in two ways - read the rest of the article for the walkthrough.

The first method assumes your using bash shell /bin/bash:

  1. First make sure you have a .profile or .bash_profile or .bash_login file. Within the particular file, include the following lines to reference a .bashrc:
    if [ -f ~/.bashrc ]; then
    . ~/.bashrc
    fi
    Note there is a space between the period and the tilde within the "if" statement. This makes reference to a file called .bashrc, which is a good file to put aliases in.

  2. From within your home directory, vi .bashrc, and add the following line:
    alias telnet='telnet -K'
  3. Restart Terminal and every time you telnet, it will no try to autolog you into the host.
Second Method:

In your home directory, vi the file .telnetrc and add the following line to it:
  DEFAULT set autologin off
Note that this will be the default for all hosts telneted to. You can set this on a host by host basis by substituting DEFAULT for a particular hostname.

I don't like the second method as much as the first since the second method prints extra lines to the screen whenever a telnet is is run.

Comments (5)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20020829061223936