As administrators we handle a lot of distinct Linux machines, often logging on simply as root to restart a service, create a user or do other sundry maintenance tasks. Working in Germany with colleagues who prefer to use cursor keys in Emacs mode means that I always have to at the very least run loadkeys us; set -o vi in the shell just after connecting to a remote machine over SSH(Secure Shell). The reason? The machine doesn't know it is me, JP, who is connecting. Obviously. The machine doesn't know, because it is always root connecting. I could of course set up a number of ifs in /etc/profile to find out from which client IP address I'm connecting, but that method isn't foolproof and doesn't work at all when client addresses are allocated dynamically. I'm working on a solution which entails keeping a distributed profile which will be loaded depending on the username of the person logging on. I'll be keeping the profile in an LDAP directory server, although any remote location would be fine. And how will the machine know it is me? By judiciously using an environment variable set up by the SSH server. Oh, and before you ask: yes, of course I know all about NFS(Network File System). A number of machines we use may not use NFS, though, quite apart from the fact that it'd be overkill for just that.

Flattr this
Software and SSH :: 23 Feb 2006 :: e-mail

Comments

blog comments powered by Disqus