[Lvlug] Part II - My alias not available in ssh remote command
Paul Ryan
paul.ryan at usa.net
Thu Jul 28 11:31:00 EDT 2005
Ok, I guess I made the last example too complex so it didn't get read
completely through. Thanks for your replies so far. Yes, I know that
.profile isn't sourced during an ssh remote command, and "yes" all my aliases
are in .bashrc, which is sourced. As a matter of fact, I have a line in
.profile which reads ". $HOME/.bashrc" so I get a consistant interface from
all logins. Unlike .kshrc, .bashrc isn't sourced on a normal interactive
login unless forced. To see that .bashrc is actually being sourced, I placed
an:
"echo In the .bashrc file"
command inside it so you can see below that it IS being sourced.
Notice in first command (alias) the ll alias is listed, so it must be getting
placed in my environment space.
In the second command (alias ll), it's dereferenced, so I know it's being
setup correctly.
In the third command (ll) the alias can't be found. That's the part that
confuses me.
In the last example, notice the "ls -l" command actually does run on the
remote machine, just not from an alias.
I didn't put the foreign machine example in this time, since it didn't help
understanding the question.
Still confused in Orefield,
Paul
- - - - - S A M P L E O U T P U T - - - - -
bash-2.05b$ ssh aten3 at linux-server "alias"
aten3 at linux-server's password:
In the .bashrc file.
alias c='clear'
alias ll='ls -l'
bash-2.05b$
bash-2.05b$ ssh aten3 at linux-server "alias ll"
aten3 at linux-server's password:
In the .bashrc file.
alias ll='ls -l'
bash-2.05b$
bash-2.05b$ ssh aten3 at linux-server "ll"
aten3 at linux-server's password:
In the .bashrc file.
bash: ll: command not found
bash-2.05b$
bash-2.05b$ ssh aten3 at linux-server "ls -l"
aten3 at linux-server's password:
In the .bashrc file.
total 2652
drwx------ 2 pfr2 faculty 130 Oct 8 2003 Calendar
-rwxr-xr-x 1 pfr2 faculty 3097 May 2 13:03 How2MapHome.txt
-rw------- 1 pfr2 faculty 2380 Sep 12 2003 Out_LOUD.txt
-rw-r--r-- 1 pfr2 faculty 3883 Oct 6 2003 X_Setup.html
-rw-r--r-- 1 pfr2 faculty 18 Jul 11 11:15 abaqus_v6.env
drwxr-xr-x 2 pfr2 faculty 4096 Oct 21 2004 beo-seminar
etc. ...
More information about the Lvlug
mailing list