RE: Linux ssh Logon error prompt

  • From: Ndidi Ibeachum <chinedui@xxxxxxxxxx>
  • To: "Radoulov, Dimitre" <cichomitiko@xxxxxxxxx>
  • Date: Fri, 20 Dec 2013 15:07:49 +0100

Dear Dimitre;
Find the output below:
[grid@rac1 ~]$ ssh rac2Last login: Fri Dec 20 11:04:16 2013 from 
rac1.lcldomain-bash: [/bin/bash: No such file or directory
#grid settingsTMP=/tmp; export TMP+ TMP=/tmp+ export TMPTMPDIR=$TMP; export 
TMPDIR+ TMPDIR=/tmp+ export TMPDIR

# Get the aliases and functionsif [ -f ~/.bashrc ]; then        . ~/.bashrcfi+ 
'[' -f /home/grid/.bashrc ']'+ . /home/grid/.bashrc# .bashrc
# Source global definitionsif [ -f /etc/bashrc ]; then        . /etc/bashrcfi++ 
'[' -f /etc/bashrc ']'++ . /etc/bashrc# /etc/bashrc
# System wide functions and aliases# Environment stuff goes in /etc/profile
# are we an interactive shell?if [ "$PS1" ]; then  if [ -z "$PROMPT_COMMAND" ]; 
then    case $TERM in        xterm*)                if [ -e 
/etc/sysconfig/bash-prompt-xterm ]; then                        
PROMPT_COMMAND=/etc/sysconfig/bash-prompt-xterm                else            
PROMPT_COMMAND='printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" 
"${PWD/#$HOME/~}"'                fi                ;;        screen)           
     if [ -e /etc/sysconfig/bash-prompt-screen ]; then                        
PROMPT_COMMAND=/etc/sysconfig/bash-prompt-screen                else            
PROMPT_COMMAND='printf "\033]0;%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" 
"${PWD/#$HOME/~}"'                fi                ;;        *)                
[ -e /etc/sysconfig/bash-prompt-default ] && 
PROMPT_COMMAND=/etc/sysconfig/bash-prompt-default            ;;    esac  fi  # 
Turn on checkwinsize  shopt -s checkwinsize  [ "$PS1" = "\\s-\\v\\\$ " ] && 
PS1="[\u@\h \W]\\$ "fi+++ '[' '\s-\v\$ ' ']'+++ '[' -z '' ']'+++ case $TERM 
in+++ '[' -e /etc/sysconfig/bash-prompt-xterm ']'+++ PROMPT_COMMAND='printf 
"\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'+++ shopt 
-s checkwinsize+++ '[' '\s-\v\$ ' = '\s-\v\$ ' ']'+++ PS1='[\u@\h \W]\$ '
if ! shopt -q login_shell ; then # We're not a login shell        # Need to 
redefine pathmunge, it get's undefined at the end of /etc/profile    pathmunge 
() {                if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then       
                 if [ "$2" = "after" ] ; then                                
PATH=$PATH:$1                        else                                
PATH=$1:$PATH                        fi                fi        }
    # By default, we want umask to get set. This sets it for non-login shell.   
 # You could check uidgid reservation validity in    # 
/usr/share/doc/setup-*/uidgid file    if [ $UID -gt 99 ] && [ "`id -gn`" = "`id 
-un`" ]; then       umask 002    else       umask 022    fi
        # Only display echos from profile.d scripts if we are no login shell    
# and interactive - otherwise just process them to set envvars    for i in 
/etc/profile.d/*.sh; do        if [ -r "$i" ]; then            if [ "$PS1" ]; 
then                . $i            else                . $i >/dev/null 2>&1    
        fi        fi    done
        unset i        unset pathmungefi+++ shopt -q login_shell# vim:ts=4:sw=4
# User specific aliases and functions
# User specific environment and startup programs
ORACLE_SID=+ASM2; export ORACLE_SID+ ORACLE_SID=+ASM2+ export 
ORACLE_SIDORACLE_HOSTNAME=rac2; export ORACLE_HOSTNAME+ ORACLE_HOSTNAME=rac2+ 
export ORACLE_HOSTNAMEORACLE_UNQNAME=racdb; export ORACLE_UNQNAME+ 
ORACLE_UNQNAME=racdb+ export ORACLE_UNQNAMEORACLE_HOME=/u01/app/11.2.0/grid; 
export ORACLE_HOME+ ORACLE_HOME=/u01/app/11.2.0/grid+ export 
ORACLE_HOMEORACLE_TERM=xterm; export ORACLE_TERM+ ORACLE_TERM=xterm+ export 
ORACLE_TERM
PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:/usr/sbin:/sbin:/usr/bin; export PATH+ 
PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/grid/bin:/u01/app/11.2.0/grid/bin:/usr/sbin:/sbin:/usr/bin+
 export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH+ 
LD_LIBRARY_PATH=/u01/app/11.2.0/grid/lib:/lib:/usr/lib+ export 
LD_LIBRARY_PATHCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;
 export CLASSPATH+ 
CLASSPATH=/u01/app/11.2.0/grid/JRE:/u01/app/11.2.0/grid/jlib:/u01/app/11.2.0/grid/rdbms/jlib+
 export CLASSPATH
#inserting the gridhome
#PATH=$PATH:/u01/app/11.2.0/grid/bin#export PATH# .bash_profile 
inserted#BASE_PATH=$PATH:/usr/sbin; export BASE_PATH
## aliases
alias ll='ls -l'+ alias 'll=ls -l'printf "\033]0;%s@%s:%s\007" "${USER}" 
"${HOSTNAME%%.*}" "${PWD/#$HOME/~}"++ printf '\033]0;%s@%s:%s\007' grid rac2 
'~'[grid@rac2 ~]$ 
Date: Fri, 20 Dec 2013 14:52:58 +0100
From: cichomitiko@xxxxxxxxx
To: chinedui@xxxxxxxxxx
Subject: Re: Linux ssh Logon error prompt


  
    
  
  
    On 20/12/2013 14:43, Ndidi Ibeachum
      wrote:

    
    
      
      [...]

        
          ldd /bin/bash
                  linux-vdso.so.1 =>  (0x00007fff7d9b4000)
                  libtermcap.so.2 => /lib64/libtermcap.so.2
            (0x00000038fec00000)
                  libdl.so.2 => /lib64/libdl.so.2
            (0x00000038fd400000)
                  libc.so.6 => /lib64/libc.so.6
            (0x00000038fcc00000)
                  /lib64/ld-linux-x86-64.so.2 (0x00000038fc800000)
          

          
          At the same time there is no chroot directive in the
            sshd_config files.
        
      
    
    

    Thanks! You could add the following line at the top of .bash_profile
    on the remote server:

    

    set -xv

    

    Then login with:

    

    ssh -vvv <hostname> 

    

    ... and post the entire output.

    After that remove the line "set -xv" from your .bash_profile.

    

    

    Regards

    Dimitre
                                          

Other related posts: