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.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityI 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.
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.
alias
for simple cases like this. alias t1="telnet foo.bar.blat"
, etc.
Feb 1, 2012 at 3:47