I constantly need to type some hostnames / IPs to telnet, and sadly they don't support ssh.

Is there a config file for telnet similar to ssh? I don't have admin access to change the /etc/hosts file.

  • What is it that you're wanting to configure? What is it that can be configured in ssh which overrides / is equivalent to the data in /etc/hosts?
    – symcbean
    Feb 1, 2012 at 11:15

1 Answer 1


telnet reads from ~/.telnetrc at startup, but that won't help you with typing long hostnames. For that you should make yourself some shell functions like this:

t1 () { telnet foo.bar.blat; }
t2 () { telnet crock.fook.ack; }
t3 () { ... and so on... }

Put them in your .bashrc, or .zshrc or whatever your shell reads at startup and then type t1 when you need to telnet to foo.bar.blat.

  • 2
    You can also use alias for simple cases like this. alias t1="telnet foo.bar.blat", etc. Feb 1, 2012 at 3:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .