RE: Linux ssh Logon error prompt
From: Ndidi Ibeachum <chinedui_at_live.co.uk>
Date: Mon, 23 Dec 2013 10:56:50 +0100
Message-ID: <DUB116-W87ECF953573C3B1D3437FCEFC10_at_phx.gbl>
Date: Mon, 23 Dec 2013 10:56:50 +0100
Message-ID: <DUB116-W87ECF953573C3B1D3437FCEFC10_at_phx.gbl>
Dear Gurus;
Thank you for the massive support. I am indeed humbled.
It turns out there was a typo as seen below in the /etc/profile :
if [$SHELL = "/bin/ksh" ];
Once I included a space as below:
if [ $SHELL = "/bin/ksh" ];
The problem went away.
Date: Mon, 23 Dec 2013 09:22:56 +1000
From: dedba_at_tpg.com.au
To: chinedui_at_live.co.uk
CC: oracle-l_at_freelists.org
Subject: Re: Linux ssh Logon error prompt
Hi Ndidi,
It looks to me like a typo in the shebang line. Could you check the _first_ line of these files (on the server that you are using ssh to access):
~/.profile ~/.bashrc ~/.bash_profile and any shell scripts that are called from these files. The first line often has something like '#!/bin/bash', but in these files it is not needed. I suspect that in one of these files there may be a stray square bracket like '#![...'. It could also be a typo in /etc/profile, but that would affect every account. Cheers, Tony On 20/12/13 21:31, Ndidi Ibeachum wrote: Dear Gurus; I have a problem I stumbled upon and I am hoping you can direct me on a fix even though this is a Linux question and sort of trivial. The Environment is Oracle Enterprise Linux 6 (x86-64). I am configuring some Linux servers for an oracle installation. I noticed that after setting up the environments and user equivalence using sshUserSetup.sh included in the 11.2.0.3 GI package, using ssh to log on to another server succeeds but throws the following error after login: -bash: [/bin/bash: no such file or directory This problem does not happen when I log on to any users shell normally, it only does using ssh to another server. I have checked the $PATH variables and /etc/profile, the .bash_profile for all the users and all the servers. I also tried loading the path variables in .bashrc. I have created another user afresh and tested and it still gives the same error. At a point I thought it was the "PermitUserEnvironment" directive in sshd_config which was causing the problem and set it to "yes" but the problem still persists. I am at a loss to where this problem is coming from. Could it be an edit I made or something wrong elsewhere? Your keen eyes are needed. Thanks in advance.
-- http://www.freelists.org/webpage/oracle-lReceived on Mon Dec 23 2013 - 10:56:50 CET