Re: bashrc and .profile for password-less ssh
- From: Marius Gedminas <marius@xxxxxx>
- Date: Thu, 2 Sep 2010 19:32:13 +0300
On Thu, Sep 02, 2010 at 10:41:55AM -0500, shantanu pavgi wrote:
I am having some issue in executing in setting values in .bashrc file on ssh
based command execution. If I log in using SSH then bashrc is sourced and
settings in it work. But following doesn't work and returns no value:
{{{
inode:~ shantanu$ ssh 192.168.174.129 "echo $CATALINA_HOME"
}}}
Interactive shells are different:
* they don't read .profile
* they read .bashrc, but your bashrc returns early:
****** And here is .bashrc file:
{{{
shantanu@ubox:~$ cat .bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
There.
Move your variable definition above that line and it will be used both
for interactive and non-interactive shell sessions.
Marius Gedminas
--
Cool. Does it also recode ISO10646-1 pcf files into the funny
permutations and subsets used a long time ago in a galaxy far far away
on the planets Isolatinus XV and Koiruski VIII ...
-- Markus Kuhn inquires about libXft
Attachment:
signature.asc
Description: Digital signature
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
- References:
- bashrc and .profile for password-less ssh
- From: shantanu pavgi
- bashrc and .profile for password-less ssh
- Prev by Date: Re: 8.04 to 10.04 dist upgrade
- Next by Date: Re: Printer driver
- Previous by thread: Re: bashrc and .profile for password-less ssh
- Next by thread: Re: bashrc and .profile for password-less ssh
- Index(es):
Relevant Pages
|