[Bradford] problem with alias

Wayne Hanley wayney at gmail.com
Mon Aug 3 22:04:32 UTC 2009


Hi all,

I'm having a random issue with my .profile just wondering if anyone might
have any suggestions as what is going on.

What the problem is is that I have some aliases set up as follows

alias kong='ssh admin at kong'
alias invader='ssh admin at invader'
alias percy='ssh phluidity at percy'
alias merlin='ssh phluidity at merlin'

I also have corresponding entries in /etc/hosts on my local machine to the
machines, the ip's of which are a mixture of local and remote addresses.
The random part is that my hosts file is fine, I can browse to the the
machines via hostname or do a simple "ping hostname" and that confirms that
the right ip's are mapped to the right names so I am almost certain there is
nothing wrong with that side of things.

So then a simple command of "kong" or "Invader" (both of these are remote
machines off my local network ergo have realworld ip's mapped to the host
names locally) presents me with a password prompt as you would expect this
good.

Doing so with either percy or merlin however gives me a "command not found"
error.  OK the first time I had edited my .profile so I reload it with ".
.profile" no problem try again and all is fine, all four of the aliases
work.  Closing that terminal session and then opening another however yields
the same problem, I can ping the host names of all four machine and I get
the correct IP's responding, but entering just the aliases only kong and
invader work, percy and merlin give me the same command not found!  doing a
quick ". .profile" again solves the problem for the duration of that shell
session.  The problem is persistent between reboots but only for percy and
merlin, invader and kong work fine!

I have no other conflicting aliases in my .profile I've stripped it back to
a virgin .profile with no other custom additions to it and still the problem
persists! adding another alias to a IP rather than a hostname gives the same
problem changing the string to ssh -l etc gives the same problem also but
works fine for invader and kong :/

I've tried with several different terminal emulators also just in case.  I'm
using Ubuntu 9.04 on the machine showing the problem and all of the servers
are running Ubuntu server 8.04lts.  Trying to connect with another alias to
a non ubuntu distro gives the same problem, I have tested this with aliases
to debian and slackware boxes.

Granted it is not a issue I've got around it by running . .profile every
time I open a shell and yeah I can automate this, I would like to get to the
bottom of the issue though just out of interest.  Any idea's or suggestions
as to why this could be happening or how to get around it would be greatly
appreciated.

Regards
Wayne

-- 
-------------------------------
Geeks are people too.


More information about the Bradford mailing list