Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

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.

share|improve this question
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

1 Answer 1

up vote 3 down vote accepted

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; }
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

share|improve this answer
You can also use alias for simple cases like this. alias t1="telnet", etc. – Michael Mrozek Feb 1 '12 at 3:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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