[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Fwd: Non interactive ssh connection



I have now appended ~/.bashrc to ~/.profile, logout and login at all
machines, and what I want to source NON-INTERACTIVELY written in
~/.bashrc was not sourced from command

thisnode$ ssh othernode env | sort

The output (below, between ===) was the same as when ~/.bashrc was not
appended to ~/.profile

===============
HOME=/home/francesco
LANG=en_US.UTF-8
LOGNAME=francesco
MAIL=/var/mail/francesco
PATH=/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
PWD=/home/francesco
SHELL=/bin/bash
SHLVL=1
SSH_CLIENT=192.168.1.33 46655 22
SSH_CONNECTION=192.168.1.33 46655 192.168.1.33 22
USER=francesco
_=/usr/bin/env
=============

I do not understand the last line of the output above.

You said that .bash_profile will be read but there is no default such
file. I assumed that .profile is the equivalent in debian because,
where .bash_profile needed to have non-interactive login, that file
should be there by default. non-interactive ssh login is at the basis
of any computation.

thanks
francesco



---------- Forwarded message ----------
From: Jochen Schulz <ml@well-adjusted.de>
Date: Thu, Apr 16, 2009 at 9:15 PM
Subject: Re: Non interactive ssh connection
To: debian-amd64@lists.debian.org


Francesco Pietra:
>
> when I do a non interactive ssh connection, the .bashrc
> and .bash_profile files in the home directory are not executed during
> the login. Indeed I need that ssh reads the .bashrc file during a non
> interactive login, in order to run mpi jobs, that uses program placed in
> non-conventional paths.

Check the default shell of the user in /etc/passwd. Only bash reads
.bash_profile. Renaming it to .profile might help (if it doesn't contain
bashims).

J.
--
It is not in my power to change anything.
[Agree]   [Disagree]
                <http://www.slowlydownward.com/NODATA/data_enter2.html>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAknng7sACgkQ+AfZydWK2zmY6gCgqyusFBuyk9i2yf5DW2HlYbdT
+pgAoJhhyolOyNJ0gwsKyvHKb9ro2Yig
=1g6u
-----END PGP SIGNATURE-----

Attachment: signature.asc
Description: PGP signature


Reply to: