Why does bash invocation differ on AIX when using telnet vs ssh

Posted by Philbert on Server Fault See other posts from Server Fault or by Philbert
Published on 2010-08-18T20:00:12Z Indexed on 2011/01/04 0:55 UTC
Read the original article Hit count: 406

Filed under:
|
|
|

I am using an AIX 5.3 server with a .bashrc file set up to echo "Executing bashrc." When I log in to the server using ssh and run:

bash -c ls

I get:

Executing bashrc
.
..
etc....

However, when I log in with telnet as the same user and run the same command I get:

.
..
etc....

Clearly in the telnet case, the .bashrc was not invoked. As near as I can tell this is the correct behaviour given that the shell is non-interactive in both cases (it is invoked with -c). However, the ssh case seems to be invoking the shell as interactive. It does not appear to be invoking the .profile, so it is not creating a login shell. I cannot see anything obviously different between the environments in the two cases.

What could be causing the difference in bash behaviour?

© Server Fault or respective owner

Related posts about ssh

Related posts about bash