2

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 '12 at 11:15
3

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. – Michael Mrozek Feb 1 '12 at 3:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.