LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   ssh problem (https://www.linuxquestions.org/questions/linux-networking-3/ssh-problem-423017/)

cranium2004 03-08-2006 10:34 PM

ssh problem
 
Hi,
Can it be possible to display some messages whenever any user ssh to my computer?? i mean like in redhat linux there is issue.net. so is there any thing for ssh connections also?

Other problem is how can i record users sshing to me in any log file?

haertig 03-08-2006 11:53 PM

Quote:

Originally Posted by cranium2004
Other problem is how can i record users sshing to me in any log file?

This should already be logged in /var/log/auth.log

RHELL 03-08-2006 11:59 PM

In /etc/ssh/sshd_config:
PrintMotd yes

cranium2004 03-09-2006 12:13 AM

hi haertig,
I search whole system but unable to find any auth.log on my RHEL system. my ls /var/log output is
Quote:

acpid boot.log.2 cron.3 iptraf maillog.3 messages.4 rpmpkgs.2 secure.1 spooler.2 xferlog Xorg.0.log.old
anaconda.log boot.log.3 cron.4 lastlog maillog.4 Pegasus rpmpkgs.3 secure.2 spooler.3 xferlog.1
anaconda.syslog boot.log.4 cups mail messages ppp rpmpkgs.4 secure.3 spooler.4 xferlog.2
anaconda.xlog cron dmesg maillog messages.1 prelink.log samba secure.4 vbox xferlog.3
boot.log cron.1 gdm maillog.1 messages.2 rpmpkgs scrollkeeper.log spooler wtmp xferlog.4
boot.log.1 cron.2 httpd maillog.2 messages.3 rpmpkgs.1 secure spooler.1 wtmp.1 Xorg.0.log

cranium2004 03-09-2006 12:18 AM

Hi RHELL,
I did In /etc/ssh/sshd_config:
PrintMotd yes
but that only displays Last Login information. how can my message must be displayed whenever anyone ssh to me?? and where can i add that message?

haertig 03-09-2006 10:36 AM

Quote:

Originally Posted by cranium2004
I search whole system but unable to find any auth.log on my RHEL system.

Logging is configurable. I thought auth.log was somewhat universal, but obviously I was wrong. In my /etc/syslog.conf file I have a line like this:
Code:

auth,authpriv.* /var/log/auth.log
This is what directs authorization-type messages to that file I mentioned. You may have something similar. Although on RHEL your syslog configuration file may be somewhere else than /etc/syslog.conf

You could also just grep in /var/log and try to brute force find the correct logfile. Try:
Code:

# grep ssh /var/log/*log

haertig 03-09-2006 10:42 AM

You may also have ssh messages logged into some subdirectory under /var/log. For example, my samba messages are logged into /var/log/samba/log.* You'll just have to manually snoop around a little to find what you're looking for. I'm not familiar with the default logging structure of RHEL.

cranium2004 03-09-2006 01:46 PM

Thanks all
i got the file under /var/log/secure but what abt message to display for users connecting thru' ssh to me?

cleidh_mor 03-10-2006 03:42 PM

Try putting some text in /etc/motd. This should be displayed each time you login.


All times are GMT -5. The time now is 11:50 AM.