The first method assumes your using bash shell /bin/bash:
- 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
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.
. ~/.bashrc
fi
- From within your home directory, vi .bashrc, and add the following line:
alias telnet='telnet -K'
- Restart Terminal and every time you telnet, it will no try to autolog you into the host.
In your home directory, vi the file .telnetrc and add the following line to it:
DEFAULT set autologin offNote 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.

