How to desactivate message SSH?


 
Thread Tools Search this Thread
Operating Systems AIX How to desactivate message SSH?
# 1  
Old 05-27-2010
How to desactivate message SSH?

hello,

When i connect to a server with ssh command ("ssh -q xxxx" / AIX 6.1) .
I always have the variable environnement display:

Code:
Environment:
  USER=root
  LOGNAME=root
  LOGIN=root
  HOME=/root
  PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java5/jre/bin:/usr/java5/bin:/usr/local/bin:/usr/dit/configure/bin:
  MAIL=/var/spool/mail/root
  SHELL=/usr/bin/ksh
  TZ=NFT-1DFT,M3.5.0/02:00,M10.5.0/03:00
  SSH_CLIENT=10.203.8.147 43943 22
  SSH_CONNECTION=10.203.8.147 43943 10.203.0.11 22
  SSH_TTY=/dev/pts/0
  TERM=xterm
  AUTHSTATE=compat
  LANG=C
  LOCPATH=/usr/lib/nls/loc
  NLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat
  LC__FASTMSG=true
  ODMDIR=/etc/objrepos
  G_BROKEN_FILENAMES=1

How can i erase it ?
# 2  
Old 05-27-2010
Hi,
Could you post from target server the .profile file of user which is used to connect ? And /etc/environment.
Thanks.

---------- Post updated at 12:28 PM ---------- Previous update was at 12:06 PM ----------

Do you have this file "environement" under ~.ssh/ (on target server) ? If yes , you can disable sshd to read that file in /etc/ssh/sshd_config file by changing this to NO.

Code:
PermitUserEnvironment no


Last edited by phobus; 05-27-2010 at 09:13 AM..
# 3  
Old 05-27-2010
I dont't have a file environment under .ssh/

Code:

.profile

if [ -s "$MAIL" ]           # This is at Shell startup.  In normal
then echo "$MAILMSG"        # operation, the Shell checks
fi                          # periodically.

stty erase ^?
set -o vi
export PS1=`whoami`@`uname -n`':$PWD # '

alias ll='ls -la'
alias mks='cd /export/mksysb/opnimsip'
alias outil='cd /outillage/script_exploit/bin/youssef'
alias reset='nim -o reset -F $1;nim -Fo deallocate -a subclass=all $1'
echo "Alias mks : /export/mksysb/opnimsip"
export PATH=$PATH:/outillage/script_exploit/bin

/etc/environnent

PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java5/jre/bin:/usr/java5/bin:/usr/local/bin:/usr/dit/configure/bin:
TZ=NFT-1DFT,M3.5.0/02:00,M10.5.0/03:00
LANG=C
LOCPATH=/usr/lib/nls/loc
NLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat
LC__FASTMSG=true
ODMDIR=/etc/objrepos
G_BROKEN_FILENAMES=1

Thank you
# 4  
Old 05-27-2010
Could you paste as well /etc/profile ? Thanks.
# 5  
Old 05-27-2010
/etc/profile

Code:
trap "" 1 2 3
readonly LOGNAME

MAIL=/usr/spool/mail/$LOGNAME
MAILMSG="[YOU HAVE NEW MAIL]"

TERM_DEFAULT=lft
TERM=`termdef`
TERM=${TERM:-$TERM_DEFAULT}

if [ "$LC_MESSAGES" = "C@lft" -a "$TERM" != "lft" ]
then
        unset LC_MESSAGES
fi

export LOGNAME MAIL MAILMSG TERM

alias ll='ls -la'
banner NIM SDIN 6.1.3
export IP=`who -m |awk ' { print $6} ' |cut -d\( -f2|cut -d\) -f1`
export HISTFILE=~/.sh_history_$IP
export HISTCONTROL=ignoreboth
export HISTSIZE=50000
EXTENDED_HISTORY=ON
export EXTENDED_HISTORY

if [ -n "$LOGNAME" -a "$LOGNAME" != "root" ]; then
        if ( ! grep -wq "$LOGNAME" /etc/passwd); then
                eval `/usr/sbin/lsuser -a home "$LOGNAME" | cut -d " " -f2`
                if [ ! -d "$home" ]; then
                        sudo /usr/cac/bin/createhome.sh
                        [ -d "$home" ] && HOME=$home && cd $HOME
                fi
        fi
fi
trap 1 2 3

# 6  
Old 05-27-2010
Do you have a /.kshrc file? If you do, can you post it?

Also, do this:
Code:
cd /
grep Environment *
grep Environment .*

# 7  
Old 05-27-2010
And you you post this file ~/.kshrc ? pls

---------- Post updated at 02:15 PM ---------- Previous update was at 02:15 PM ----------

kah00na is faster .... Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

ssh fails from one server only with expecting SSH2_MSG_KEXDH_REPLY message

I have two linux servers viz 12.7.44.18 and 12.7.45.18 I wish to ssh from both these server to a destination AiX server 12.7.33.18 The ssh works from 12.7.44.18 -> 12.7.33.18 but fails from 12.7.45.18 -> 12.7.33.18 The openssl version on both linux source 12.7.44.18 and 12.7.45.18 is the... (7 Replies)
Discussion started by: mohtashims
7 Replies

2. UNIX for Beginners Questions & Answers

Ssh script to validate ssh connection to multiple serves with status

Hi, I want to validate ssh connection one after one for multiple servers..... password less keys already setup but now i want to validate if ssh is working fine or not... I have .sh script like below and i have servers.txt contains all the list of servers #/bin/bash for host in $(cat... (3 Replies)
Discussion started by: sreeram4
3 Replies

3. Shell Programming and Scripting

Ssh from a ksh returning not found message

Script name is test.ksh I know that that the ssh command is working properly, this can be verified by the value returned in respond variable. It is unique to the remote server _____________________________________________________ respond=$(ssh $remoteHost find... (3 Replies)
Discussion started by: Adagio
3 Replies

4. UNIX and Linux Applications

Ssmtp -t < /path/to/the/message.txt (How to format message.txt for html email)

ssmtp has been running well under Kubuntu 12.04.1 for plain text messages. I would like to send html messages with ssmtp -t < /path/to/the/message.txt, but I cannot seem to get the message.txt file properly formatted. I have tried various charsets, Content-Transfer-Encoding, rearranging the... (0 Replies)
Discussion started by: Ronald B
0 Replies

5. Shell Programming and Scripting

Run cron on ssh, error message

how to run the script below * * * * * /usr/bin/wget -O - -q "http://example.com/scheduler/cron" when i run the script, the error message show as below: $ * * * * * /usr/bin/wget -O - -q "http://website.com/?q=admin/settings/scheduler/cron" -sh: CHANGELOG.txt: not found $ 30 15 * * *... (11 Replies)
Discussion started by: dolbyater
11 Replies

6. UNIX for Advanced & Expert Users

SSH public key failing without error message

My password-free ssh connection has worked in the past but has stopped working and I can't get it going again. The files in .ssh on both source and target are set to 600: drwx------ 2 ingres 1024 Mar 2 13:57 . drwxr-xr-x 25 ingres 2048 Mar 29 09:38 .. -rw------- 1 ingres ... (9 Replies)
Discussion started by: Catullus
9 Replies

7. Programming

[XQuery] How to Convert from JSON Message to XML Message with XQuery

Hi guys, I'm in a job of converting a restful webservice to soap. Tool for convertation uses XQuery. Now i need to convert a message like this: { "firstName": "John", "midName": null, "lastName": "Smith", "married": false, "address": { "streetAddress": "21 2nd... (5 Replies)
Discussion started by: tien86
5 Replies

8. Linux

SSH Warning Welcome message?

Hi all, I just configured automatic login between two servers following this article: SSH login without password When I execute the following command: ssh REMOTE "/script/output.sh"I get: Warning: This system is restricted to authorized users for business purposes. Unauthorized... (2 Replies)
Discussion started by: Evan
2 Replies

9. Programming

How to limit max no of message in a posix message queue

Hii can anyone pls tell how to limit the max no of message in a posix message queue. I have made changes in proc/sys/fs/mqueue/msg_max But still whenever i try to read the value of max. message in the queue using attr.mq_curmsgs (where struct mq_attr attr) its giving the default value as 10.... (0 Replies)
Discussion started by: mohit3884
0 Replies
Login or Register to Ask a Question